Part Number: MSP432P401R
Other Parts Discussed in Thread: SIMPLELINK-MSP432-SDK
File:
interrupt.c
Function:
void Interrupt_setPriorityGrouping(uint32_t bits)
{
//
// Check the arguments.
//
ASSERT(bits < NUM_PRIORITY);
//
// Set the priority grouping.
//
SCB->AIRCR = SCB_AIRCR_VECTKEY_Msk | g_pulPriority[bits];
}
Question:
In my opinion, the code“SCB->AIRCR = SCB_AIRCR_VECTKEY_Msk | g_pulPriority[bits];” should be “SCB->AIRCR = (((uint32_t)0x5FAUL << SCB_AIRCR_VECTKEY_Pos)) | g_pulPriority[bits];” at least,not to mention we should mask the bits not-PRIORITY-relation.