Hi there,
Since several days I'm trying to get SystemView running but it always ends up in a
So far I've checked the SystemView documentation "System View User Guide" (UM08027) and compared what's written on page 54 with my config which seems to be "equal". Prior trying out SystemView I've checked out RTT which is running.
As background information I want let you know that I'm working at a non-profit organization on a research project which makes use of FreeRTOS 10.x on the new STM32WB55 Nucleo board, because we want make use of the Bluetooth 5 standard.
In the source code are currently two task implemented. Without starting
The main function is the following:
Display All
The call stack (in reverse order) is this:
In the last functions the interesting variables are:
(only the first number reflects the number in the original source code)
Because
Since several days I'm trying to get SystemView running but it always ends up in a
configASSERT()
= endless loop. I suppose that this issue has to do with interrupts or a misconfigured NVIC.So far I've checked the SystemView documentation "System View User Guide" (UM08027) and compared what's written on page 54 with my config which seems to be "equal". Prior trying out SystemView I've checked out RTT which is running.
As background information I want let you know that I'm working at a non-profit organization on a research project which makes use of FreeRTOS 10.x on the new STM32WB55 Nucleo board, because we want make use of the Bluetooth 5 standard.
In the source code are currently two task implemented. Without starting
SEGGER_SYSVIEW_Start()
these two task are running as expected. If I start SEGGER_SYSVIEW_Start()
first this function will never return.The main function is the following:
C Source Code: main.cpp
- #include "SEGGER_RTT.h"
- #include "FreeRTOS.h"
- #include "task.h"
- #include "cmsis_os.h"
- void vTask1(void*);
- void vTask2(void*);
- main()
- {
- HAL_Init(); // this function finally does only SET_BIT(FLASH->ACR, FLASH_ACR_PRFTEN) and HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);
- SystemClock_Config(); // several RCC_* initialization and peripheral clock initialization
- HAL_NVIC_SetPriority(PendSV_IRQn, 15, 0); // originally this is HAL_MspInit(); //
- DWT->CTRL |= (1 << 0); // enable CYCCNT (Cycle Counter Register, DWT_CYCCNT, address 0xE0001024@Cortex-M4) for Segger SystemView
- SEGGER_SYSVIEW_Conf();
- SEGGER_SYSVIEW_Start(); // here it ends if not commented out
- SEGGER_RTT_printf(0, "%sCounter: %s%d\n", RTT_CTRL_TEXT_BRIGHT_WHITE, RTT_CTRL_TEXT_BRIGHT_GREEN, 4); // some text to check if J_Link RTT Viewer is working
- xTaskCreate(vTask1, "Task-1", configMINIMAL_STACK_SIZE, NULL, 2, &xTaskHandle1);
- xTaskCreate(vTask2, "Task-2", configMINIMAL_STACK_SIZE, NULL, 2, &xTaskHandle2);
- vTaskStartScheduler();
- while(1)
- {};
- }
- void vTask1(void *params)
- {
- SEGGER_RTT_WriteString(0, "Hello from task A!\n");
- while(true)
- {
- SEGGER_RTT_WriteString(0, "task 1\n");
- }
- }
- void vTask2(void *params)
- {
- SEGGER_RTT_WriteString(0, "Hello from task B!\n");
- while(true)
- {
- SEGGER_RTT_WriteString(0, "task 2\n");
- }
- }
The call stack (in reverse order) is this:
main() at main.cpp: 166
SEGGER_SYSVIEW_Start() at SEGGER_SYSVIEW.c: 1684
SEGGER_SYSVIEW_RecordSystime() at SEGGER_SYSVIEW.c: 1825
_cbGetTime() at SEGGER_SYSVIEW_FreeRTOS.c: 117
xTaskGetTickCountFromISR() at tasks.c: 2329
vPortValidateInterruptPriority() at port.c: 776
vPortRaiseBASEPRI() at portmacro.h: 195
In the last functions the interesting variables are:
C Source Code: port.c
- static void vPortEnableVFP( void )
- {
- ...
- __asm volatile( "mrs %0, ipsr" : "=r"( ulCurrentInterrupt ) :: "memory" ); // ulCurrentInterrupt = 0
- ...
- if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER ) // portFIRST_USER_INTERRUPT_NUMBER = 16 ==> not true
- { ... }
- configASSERT( ( portAIRCR_REG & portPRIORITY_GROUP_MASK ) <= ulMaxPRIGROUPValue ); // portAIRCR_REG = 0xFA050300, portPRIORITY_GROUP_MASK = 0x700, ulMaxPRIGROUPValue = 0
- --> portFORCE_INLINE static void vPortRaiseBASEPRI( void )
Because
ulCurrentInterrupt
is always '0' I suppose that there is a mistake within the NVIC configuration but I don't know what's wrong with it. Has someone any clue what's wrong?