cancel
Showing results for 
Search instead for 
Did you mean: 

SysTick and DMA interrupt priorities

rgesikov
Associate II
Posted on November 20, 2015 at 08:46

Hello,

  I noticed that in the code generated by CubeMX SysTick interrupt is assigned the highest priority (0). And DMA interrupts (I didn't yet use any others) get assigned the same priority too. However, DMA ISR use HAL_GetTick() function to determine timeout and thus there is a possibility to lock the execution. The solution is to assign priority higher than 0 to ISRs that might use HAL_GetTick(). I'd propose firmware team take that as change request and assign all those ISRs priority 1 automatically in code generation.

Happy coding,

Roman.

#isr-systick
3 REPLIES 3
Posted on November 20, 2015 at 13:22

Relying on a software counter is an inherently poor idea. Having code that dwells in interrupt paths for thousands of microseconds also doesn't seem to be particularly stellar.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
rgesikov
Associate II
Posted on November 20, 2015 at 18:01

- Relying on a software counter is an inherently poor idea.

- Having code that dwells in interrupt paths for thousands of microseconds also doesn't seem to be particularly stellar.

I absolutely agree with both statements. Thus looking now at the code service DMA interrupts I'd like CubeMX team to reconsider the approach they took. Do they follow this forum, btw? What is a channel to send them feedbacks?

Posted on November 25, 2015 at 14:41

Hi gezikov.roman,

STM32CubeMx give the user the possibility to manage interrupt priority. 

However, I reassure you that forums' moderators scan all posts and take into account all our customers feedbacks. Even if, we don't intervene in all of them.

0690X00000604kDQAQ.png

 

-Shahrzad-