cancel
Showing results for 
Search instead for 
Did you mean: 

NVIC_Init() and NVIC_PriorityGroupConfig()

John Hite
Associate III
Posted on January 31, 2017 at 21:19

The notes in misc.c for NVIC_Init() state that NVIC_Init() should be called first.

The notes for NVIC_PriorityGroupConfig() list 4 priority groups. What are these priority groups and how are they determined?

There are 5 groups of 4 bits so how are they to be packed into a uint32_t?

The function NVIC_Init() is called more than once in our code, I assume one call to NVIC_PriorityGroupConfig() covers all calls to NVIC_Init() and needs to precede all of them.

Thanks,

JH

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on January 31, 2017 at 21:56

The processor implementation has 4-bits to describe priority and preemption, you get to determine the split of those 4-bits between the two.

If you split as 2 and 2 you'd get 4 priority levels, and 4 premption levels. Premption means it can interrupt during an interrupt, otherwise they take turns via the tail-chaining as ordered by the priority.

Joseph Yiu has some good books on the Cortex parts

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

View solution in original post

4 REPLIES 4
Posted on January 31, 2017 at 21:34

Read PM0214, ch. 2.3.6  Interrupt priority grouping.

JW

Posted on January 31, 2017 at 21:56

The processor implementation has 4-bits to describe priority and preemption, you get to determine the split of those 4-bits between the two.

If you split as 2 and 2 you'd get 4 priority levels, and 4 premption levels. Premption means it can interrupt during an interrupt, otherwise they take turns via the tail-chaining as ordered by the priority.

Joseph Yiu has some good books on the Cortex parts

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on January 31, 2017 at 22:49

Thanks. I am gonna have to study that a while.

Having to respond via e-mail as my browser won't bring up the forum

sometimes, just spins.

On Tue, Jan 31, 2017 at 3:34 PM, waclawek.jan <

Posted on February 02, 2017 at 22:22

I got it, I just need to spend more time reading it.