Content originally posted in LPCWare by starblue on Mon Dec 01 07:49:17 MST 2014
I'd recommend to use CMSIS functions to talk to the NVIC, in this case NVIC_SetPriority( IRQn, priority ).
Beware that the priorities are specified differently from the hardware registers. In the registers the priority is in the most significant bits of each byte, while the routine expects them in the least significant bits.