cancel
Showing results for 
Search instead for 
Did you mean: 

Systick woes with FreeRTOS

MMill.6
Associate

Using STM32CubeIDE 1.12.1 on a Nucleo G0B1RE. FreeRTOS 10.3 middleware. When I make the SYS timebase TIM6 then I don't get out of HAL_Init()

0x1fff5bc6

<signal handler called>() at 0xfffffff9

__NVIC_EnableIRQ() at core_cm0plus.h:749

HAL_NVIC_EnableIRQ() at stm32g0xx_hal_cortex.c:154

HAL_InitTick() at stm32g0xx_hal_timebase_tim.c:95

HAL_Init() at stm32g0xx)hal.c:161

main() at main.c:107

If I just use SysTick instead then I get through HAL_Init() but OsDelay() doesn't return - suggesting that vTaskDelay() ticks in FreeRTOS aren't running.

If I take an example program from STM32Cube_FW_G0_V1.6.1 then those run ok. If I then base a new program on one of those .IOC files that uses FreeRTOS then I see the same hang or no ticks behavior.

Any ideas what could be going wrong?

1 REPLY 1
MMill.6
Associate

It's something in the CubeIDE generated code and the FreeRTOS examples. I was also seeing NVIC errors about priorities and FreeRTOS at various times. Depending on what I tried, I'd also see USART validation errors. CubeIDE 1.12.0 and 1.6.0 also exhibited these errors.

I picked the SysTick example instead and then added the FreeRTOS middleware. When I did that then everything works fine.