2021-07-29 11:04 PM
Hi All,
I think understand the concept of this, what I am not 100% sure about is how each NVIC_IPRx entry relates to an actual interrupt.
Is it directly referenced to the 'Priority' number in the Interrupt Vector Table ?
So for example just looking at the device I am using, the 'TIM3 Global Interrupt' is priority 36.
If I wanted to change that specific Interrupt in the Interrupt priority register does it work like this?
NVIC Base address = 0xE000E100
NVIC_IPRx Address offset: 0x400 + 0x04
So therefore the Priority entries start at 0xE000E504
0xE000E504 = Priority entry 0 - MemManage
0xE000E505 = Priority entry 1 - BusFault
0xE000E506 = Priority entry 2 - UsageFault
0xE000E507 = Priority entry 3 - SVCall
0xE000E508 = Priority entry 4 - Not Used
0xE000E509 = Priority entry 5 - PendSV
...
...
0xE000E527 = Priority entry 35 - TIM2 Global Interrupt
0xE000E528 = Priority entry 36 - TIM3 Global Interrupt
..
..
0xE000E55C = Priority entry 88 - FPU (final definition in this device)
Is that how it works?
Thanks.
2021-07-30 05:45 AM
Always include your chip number in your post.
NVIC_SetPriority should be used to change priorities, but yes in general. Details about NVIC can be found in ARM documentation.