To work around that I wanted to use a "fast interrupt" (forgive me, I'm very new to low-level/RT programming) as per http://www.chibios.org/dokuwiki/doku.ph ... interrupts . Am I correct in believing that once I manage to get fast interrupts to work there's nothing I can screw up in software that can prevent the interrupt handler from running?
Which brings me to my next question; how do you make fast interrupts work? My current best guess has been to write the hander:
Code: Select all
CH_FAST_IRQ_HANDLER(VectorE0) {
// light the LED
palSetPad(GPIOF, GPIOF_15);
// start the emergency stop
}
and then in my initialization code call
Code: Select all
nvicEnableVector(40, 2);I'm sure I'm screwing it up somehow (the LED doesn't come on), but I really don't know how, and the thousands of pages of docs are still a bit over my head...
Is there a better way I can ensure that a GPIO can trigger a behavior absolutely no matter what (eg, needs to work even if threads are deadlocked, etc)? Perhaps an example of NMI being used?