Is there a NVIC_Init() function?

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

Is there a NVIC_Init() function?

819 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ntorresa on Fri Nov 15 22:25:08 MST 2013
Hi! For example, when I call the function:

NVIC_EnableIRQ(PWM1_IRQn);


I thought it also set PWM1 interrupt to its default value, 9. However, doing:

a = NVIC_GetPriority(PWM1_IRQn);


Throws a=0. To assign it's default value I must force:

NVIC_SetPriority(PWM1_IRQn, 9);


Isn't there a function that initializes all IRQs to their default value?

Regards.
Labels (1)
0 Kudos
4 Replies

688 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ntorresa on Sat Nov 16 08:57:23 MST 2013
Thanks for your reply R2D2.

Yes, it seems that I am mixing them up. I thought that if I enabled an IRQ it would be automatically set with a priority according that table, not with the highest priority 0.
0 Kudos

688 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sat Nov 16 07:01:26 MST 2013

Quote: ntorresa
Thanks for your reply wmues.

So IDs in page 73 of UM10360 are only a "suggestion"?



Page 87 is showing your Priority in IPR2.

Are you mixing up ID and priority?
0 Kudos

688 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ntorresa on Sat Nov 16 06:10:57 MST 2013
Thanks for your reply wmues.

So IDs in page 73 of UM10360 are only a "suggestion"?
0 Kudos

688 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wmues on Sat Nov 16 04:20:38 MST 2013
In reality, there is no "default" priority value for an IRQ.

Priority values depend on the application. They must all be set by the programmer.
Nothing else makes sense.

regards

Wolfgang
0 Kudos