IRQ Handling Best Practices
Posted: Fri Mar 15, 2024 11:50 pm
While I understand the difference of gpio_isr_register (handle all GPIO IRQs on a fixed core with your own logic) and gpio_install_isr_service (install broker on fixed core) + gpio_isr_handler_add (register one GPIO IRQ with global broker), I'm seriously missing a middle ground between those two approaches.
My application is composed of a few subsystems where IRQ handling is critical (W5500, MCP2518fd) and several subsystems where IRQ handling is uncritical (buttons, seldomly read sensors), and possibly some more "in between".
How am I supposed to map my ISRs to different IRQ levels and different IRQ flags when all I have available are such broad swords?
Do I really need to decide the IRQ flags for _all_ of my ISRs together? And is there no chance of handling some IRQs on one core and some on another?
Or should I just gpio_install_isr_service(0) like all others and carry on? Do the flags really make much a difference?
My application is composed of a few subsystems where IRQ handling is critical (W5500, MCP2518fd) and several subsystems where IRQ handling is uncritical (buttons, seldomly read sensors), and possibly some more "in between".
How am I supposed to map my ISRs to different IRQ levels and different IRQ flags when all I have available are such broad swords?
Do I really need to decide the IRQ flags for _all_ of my ISRs together? And is there no chance of handling some IRQs on one core and some on another?
Or should I just gpio_install_isr_service(0) like all others and carry on? Do the flags really make much a difference?