AnsweredAssumed Answered

systick interrupt priority

Question asked by hill.jonathan on Apr 26, 2014
Latest reply on Sep 24, 2014 by RobS
Hi all,

When my program is in an interrupt caused by an external rising edge, the systick interrupt no longer occurs.

My first thought was that the priority of the systick was lower than that of my function, so I used NVIC_SetPriority and NVIC_GetPriority to obtain the priorities of both of them, and change them to ok levels. This led me to other more fundamental questions which I would appreciate help to awsner.

Finding out the systick prioirty was easy enough, because the IRQn_Type IRQn parameter was easy to locate from the code, since it already appears in SysTick_Config function.

For my exti line however, I can't find which parameter gets passed to it!! Thats because I configured it in STM CMSIS, ie with the lines

NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x01;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x01;

When I tried to look inside the CMSIS levels of abstraction, the closest thing I could find to the set prioirty function was the thing (macro?! constant?! This is something about which I'd like clarification, it was like a functionk but with square brackets, and then just equalled something...) NVIC->IP, something which I don't understand. Its used like:

NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority;

So if anyone can clarify what that thing is, where the _IRQn definitions come from - I can't find them in my project using cntrl+shif+f, or why my systick handler is not being called in general, I'd greatly appreciate it.

So far I've tried setting the systick handler to have a lower (higher) priority than the exti interrupt with no luck using the functions

NVIC_SetPriority and NVIC_GetPriority

Best wishes,
Jonathan

Outcomes