cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with priorities of tasks on FreeRTOS (CMSIS v1) on STM32F4 DISC.

DevBee
Associate II

Analysing runtime behaviour of 2 tasks on STM32 board using tracelyzer shows unexpected behaviour. Task1 is a cyclic executive which receives data over UART and processes received data to be consumed by task2. task1 is interrupt driven (indefintely blocks on semaphore which is released in UART receive interrupt handler)

Tried reversing priority of tasks too but to no use.

The task2 always behaves as higher priority task, but I expect task2 to be preempted and task1 to be run whenever task1 is ready for execution (ie semaphore is released), which I could not achieve.

I have used HAL_UART_Receive_DMA() and HAL_UART_RxCpltCallback() with task1, whereas vTaskDelayUntil() for task2 with period 10ms.

0 REPLIES 0