BUG ! CubeH7/STM32H7 IRQ Priority issue in all FreeRTOS based examples
Hi Folks,
@ALABB @Imen DAHMEN @Amel NASRI
In all the ST Cube H7 examples which use FreeRTOS;
There exists this weird Bug! You leave any of the FreeRTOS example in the Cube H7 repository. In all likelihood, that example might freeze immediately, after a minute, or an hour, or after a day, or much later. Depends upon your luck! It is impossible to determine when the freeze will occur.
eg:
HAL_NVIC_SetPriority(TIM6_DAC_IRQn, TickPriority ,0U);
or in ethernetif.c
/* Enable the Ethernet global Interrupt */
HAL_NVIC_SetPriority(ETH_IRQn, 0x7, 0);
HAL_NVIC_EnableIRQ(ETH_IRQn);
As it turns out, I've had weird and random freezes.
It turns out that, the interrupt priority 0 (the highest).
That priority is too high to be making FreeRTOS API calls from. Hence the problem.
This BUG exists in *ALL* the CubeH7 examples. It is not limited to the Timer. It applies to *ALL* enabled IRQ's.
It is a one line simple change and fixable in a jiffy.
Please fix ASAP !
Change priority from 0 to anything higher than 5, recommended by the FreeRTOS folks.
I guess, this FreeRTOS IRQ priority BUG exists within @alister Ethernet fixes also.
" /* Peripheral interrupt init */
HAL_NVIC_SetPriority(ETH_IRQn, 12, 0);
HAL_NVIC_EnableIRQ(ETH_IRQn); "
Thank You,
Manu
