File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 22
22
#include "stm32f4xx_it.h"
23
23
/* Private includes ----------------------------------------------------------*/
24
24
/* USER CODE BEGIN Includes */
25
+ #include "SEGGER_SYSVIEW.h"
25
26
/* USER CODE END Includes */
26
27
27
28
/* Private typedef -----------------------------------------------------------*/
@@ -183,11 +184,12 @@ void PendSV_Handler(void)
183
184
void SysTick_Handler (void )
184
185
{
185
186
/* USER CODE BEGIN SysTick_IRQn 0 */
186
-
187
+ //SEGGER_SYSVIEW_TickCnt++;
188
+ SEGGER_SYSVIEW_RecordEnterISR ();
187
189
/* USER CODE END SysTick_IRQn 0 */
188
190
HAL_IncTick ();
189
191
/* USER CODE BEGIN SysTick_IRQn 1 */
190
-
192
+ SEGGER_SYSVIEW_RecordExitISR ();
191
193
/* USER CODE END SysTick_IRQn 1 */
192
194
}
193
195
Original file line number Diff line number Diff line change @@ -26,9 +26,16 @@ SystemView/SEGGER/SEGGER_SYSVIEW.c
26
26
27
27
#define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3
28
28
```
29
- 6 . 按照` [main.c](./Core/Src/main.c) ` 的方式使用` SystemView ` 的` API ` 即可;
29
+ 6 . 按照` [main.c](./Core/Src/main.c) ` 的方式使用` SystemView ` 的` API ` :
30
+ - 在需要监测的函数前后调用` SEGGER_SYSVIEW_Recordxxx() ` 和` SEGGER_SYSVIEW_RecordEndCall() ` ;(不同的函参对应不同的` API ` )
31
+ - 在需要监测的中断前后调用` SEGGER_SYSVIEW_RecordEnterISR() ` 和` SEGGER_SYSVIEW_RecordExitISR() ` ;
30
32
7 . 编译并烧录运行,然后在电脑上打开` SystemView ` ,并点击左上角工具栏中的绿色三角形即可;
31
33
32
34
## 说明
33
35
1 . 必须使用` J-Link ` 才能使用` SystemView ` ;
34
- 2 . ` JLink ` 只需要通过` SWDIO ` ,` SWCLK ` 以及` GND ` 三根线和` MCU ` 连接;
36
+ 2 . ` JLink ` 只需要通过` SWDIO ` ,` SWCLK ` 以及` GND ` 三根线和` MCU ` 连接;
37
+
38
+ ## SystemView Overflow
39
+ 1 . 将` SystemView ` 的记录停止,重新开始记录试试;
40
+ 2 . 在` SysTick_Handler ` 中断处理函数中加上` SEGGER_SYSVIEW_TickCnt++; `
41
+ 3 . 将` SEGGER_RTT_Conf.h ` 中的` BUFFER_SIZE_UP ` 加大;
You can’t perform that action at this time.
0 commit comments