cancel
Showing results for 
Search instead for 
Did you mean: 

xSemaphoreCreateBinay() crash IOs

sinolegend
Associate

IDE : STM32CubeIDE Version: 1.16.1
Board : STM32F407VG DISC1
SYS Timebase Source : TIM6

Hello,
In my project, i use I2C and multiple UARTs. It worked fine before adding FreeRTOS tasks. Recently i need add buttons to my project, so i add a new task to handle interrupts. To synchonize my EXIT ISR (callback) and the button handling task, a binary semaphore is adpoted.

Strange things happened, after creating a binary semaphore with xSemaphoreCreateBinary(), all I/Os, I2C and UARTs, are failed. Even HAL_Delay() did not work, bebugger died in HAL_GetTick() in HAL_Delay. all abnormalities happened before starting FreeRTOS kernel and initializing tasks. Commenting the xSemaphoreCreateBinary() system is back to normal.

Can someone tell me what causes the problem.

0 REPLIES 0