Default interrupt priority is high?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Default interrupt priority is high?

422 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by micrio on Tue Oct 09 10:07:52 MST 2012
Apparently the default interrupt priority is set to the maximum; 0.   The interrupt  priority registers 0-7 are all reset to zero.   This sets all interrupts to maximum priority.   Thus there is no use in;
NVIC_SetPriority(EINT2_IRQn, 0);

unless you set everything else to a lower priority.   I have been banging my head on this for a while, now I know.
0 Kudos
1 Reply

396 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Wed Oct 10 04:40:44 MST 2012
[FONT=Tahoma][SIZE=1]Clearly, you are expected to design your own priority assignments for the interrupts you want.
and assign them in your startup code.
Non-enabled interrupts will not matter, but you may want to set [I]all[/I] priorities to 31 (the lowest)
at startup in case of oversights in your (or library) code.

Do not forget to set a priority for the SysTick handler (and the other 'system' handlers) if used;
they use a different mechanism for setting priorities, but the CMSIS library funtion handles
these also (use negative interrupt id's).

Hope this helps, Mike

[/SIZE][/FONT]
0 Kudos