We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
Here is the return statement in Cortex-M0's function NVIC_GetPriority ----
__STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn) { if(IRQn < 0) { return((uint32_t)((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) >> (8 - __NVIC_PRIO_BITS))); } /* get priority for Cortex-M0 system interrupts */ else { return((uint32_t)((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) >> (8 - __NVIC_PRIO_BITS))); } /* get priority for device specific interrupts */ }
It does not shift off the heading bits of other IRQs. for example, if IRQn == 26 and NVIC->IP[ _IP_IDX(IRQn)] == 0x40404040, it return 0x101. The correct priority value should be 1.
__STATIC_INLINE uint32_t NVIC_GetPriority(IRQn_Type IRQn) { if(IRQn < 0) { return 0xFF & ((uint32_t)((SCB->SHP[_SHP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) >> (8 - __NVIC_PRIO_BITS))); } /* get priority for Cortex-M0 system interrupts */ else { return 0xFF & ((uint32_t)((NVIC->IP[ _IP_IDX(IRQn)] >> _BIT_SHIFT(IRQn) ) >> (8 - __NVIC_PRIO_BITS))); } /* get priority for device specific interrupts */ }
I don't think it's the correct attitude ..
Well now. Lets examine the evidence shall we. You have posted what you think is a bug on a forum not guaranteed to be monitored or even looked at occasionally by Keil staff. You then say that the people who have probably looked at what you wrote have got an incorrect attitude.
From this I can correctly conclude that you are an idiot.
Stop wasting our time. Goodbye.
Bighead, SHUT THE *** UP!
You need not to reply this thread like an idiot if you think it's wasting your time.