After some investigation into the NVIC I conclude the following.
If an new interrupt has a higher priority then the interrupt that is currently being processed, it interrupts the current flow. (Nesting).
If the IRQ is dissabled however, no matter what the priority of the incoming interrupt is, it is pended.
If a new interrupt has a lower priority then the interrupt that is currently being processed, it is pended.
You can set priority of individual interrupts or to an entire group of interrupts (of which there are 4).
Priority is given to the lowest interrupt number if priorities are the same.
So interrupts are not silently discarded (as long as the same interrupt doesn't fire multiple times).
Am I right?
Thanks in advance!
Melchior
I've read some old posts explaining that all Tickers use the same internal hardware timer and they all have the same priority:
I am using several Tickers in my program and want to give them highest priority over everything else.
So for instance, in the following code the OneMilliSecondTimer is called every one millisecond. The ReceiveMessagesCAN2HS is called every time a message comes in on the CAN bus. As you can see in the scope trace picture below, when the program is in the ReceiveMessageCAN2HS routine (top yellow trace) the Ticker function is not called (bottom purple trace).
// February 26, 2011 // CAN receive test. #include "mbed.h" DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalOut led3(LED3); DigitalOut led4(LED4); DigitalOut InReceiveMessagesCAN1MS(p17); DigitalOut InReceiveMessagesCAN2HS(p18); DigitalOut InOneMillisecondTimer(p19); DigitalOut InTenMillisecondTimer(p20); CAN CAN1MS(p9, p10); CAN CAN2HS(p30, p29); CANMessage RxCANMessageCAN1MS; CANMessage RxCANMessageCAN2HS; int OneMillisecondTicks; int TenMillisecondTicks; Ticker SchedulerTimerOneMilli; Ticker SchedulerTimerTenMilli; void ReceiveMessagesCAN1MS() { InReceiveMessagesCAN1MS = !InReceiveMessagesCAN1MS; InReceiveMessagesCAN1MS = 1; wait_ms(50); InReceiveMessagesCAN1MS = 0; CAN1MS.read(RxCANMessageCAN1MS); } void ReceiveMessagesCAN2HS() { //InReceiveMessagesCAN2HS = !InReceiveMessagesCAN2HS; InReceiveMessagesCAN2HS = 1; wait_ms(50); InReceiveMessagesCAN2HS = 0; CAN2HS.read(RxCANMessageCAN2HS); } void OneMillisecondTimer() { OneMillisecondTicks = OneMillisecondTicks + 1; InOneMillisecondTimer = !InOneMillisecondTimer; } void TenMillisecondTimer() { TenMillisecondTicks = TenMillisecondTicks + 1; InTenMillisecondTimer = !InTenMillisecondTimer; } int main() { //CAN1MS.frequency(125000); //MSCAN CAN2HS.frequency(500000); //HSCAN //CAN1MS.attach(&ReceiveMessagesCAN1MS); CAN2HS.attach(&ReceiveMessagesCAN2HS); SchedulerTimerOneMilli.attach_us(&OneMillisecondTimer,1000); //SchedulerTimerTenMilli.attach_us(&TenMillisecondTimer,10000); NVIC_SetPriority(TIMER3_IRQn, 1); // set mbed tickers to higher priority than other things CANMessage msg; printf("Running Main....\r\n"); while(1) { //Do Nothing.... yet.... } }