lpcware

NVIC, setting priority

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by DennisFrie on Tue Dec 30 11:14:09 MST 2014
Hi guys
I'm trying to get my head around the interrupt priorities on LPC15xx.

In its most basic form, I have an interrupt from a timer, and an interrupt triggering on UART receive. The timer interrupt is fairly long and causes a lost char at high baud-rates, if the UART-interrupt is not triggered while in the timer interrupt.

Preferably, I would just set the UART receive interrupt with higher priority, but it doesn't seem to make any difference.

Both UART interrupt and the timer interrupt works as intended (except for the priority).

From my understanding, the interrupt priority can simply be set using the NVIC_SetPriority?


NVIC_SetPriority(SCT3_IRQn, 2); // Low priority on timer
NVIC_SetPriority(UART1_IRQn, 1); // Higher priority on UART


- but it doesn't seem to make any difference. Have I missed something obvious here?

Thanks

Outcomes