3 ms·
Yes. That's exactly what it means. You can have priorities for different interrupt sources. It has utility in many critical RTOS situations. Imagine you have a
by bravo22 10y ago
Yes. That's exactly what it means. You can have priorities for different interrupt sources. It has utility in many critical RTOS situations.
Imagine you have a factory machine. The micro has an IRQ for your communication interface. This goes off when there is a packet. Obviously you want this to be handled so there is not backlog of packets, however there is another interrupt for a limit switch that goes off when the door to a chamber in the device has been opened. You want to handle that interrupt above all else so you can shut off the rotating blade in that chamber before a human hand can get in there.
- Ericson2314 10y agoYeah makes sense. But the article never actually connected the term and the concept. I did a Ctrl-F just to make sure :).
- ambrop7 10y agoIt also means you need to be extra careful compared to simpler architectures (like AVR). For example for locking you may need to disable/re-enable interrupts also within an ISR not just in the main loop / threads. If nesting is a problem for you and you want to be lazy, I think you can disable nesting between specific interrupts by giving them the same priority (though I can't find any docs right now about that).
- Gibbon1 10y agoThat's what I do on ARM, just run everything with the same priority.
- ArkyBeagle 10y ago1) You should expect lost , delayed and garbled comms. Your app layer or stacks should handle this. 2) A limit switch will still need debounce. If it's the sort of limit switch that will keep people's hand attached to their arm, I would be loathe to depend on interrupt priority for it.
- ambrop7 10y agoI suppose this was just an example of when you want to do safety-critical control in software. For something as simple, hardware measures are probably more appropriate, but your particular problem may be far too complex to solve with simple hardware-based logic. For example, consider a system in a radiation therapy machine which ensures the patient does not receive too much dose or at the wrong spots.
- bravo22 10y ago1) Indeed. 2) You can debounce reliably in hardware.