Interrupt optimisation
Posted: Tue May 12, 2020 4:52 pm
Trying to figure out how to load optimise interrupt servicing within the ESP drivers and/or understand causes.
I am seeing CAN overrun errors. The CAN device has buffering for around 5 or 6 RX frames. At 250Kbps thats 500uS per or 2.5mS total. That seems a long time to be locked out.
As I understand it app_main() is launched from Core 1.
My app_main() creates the drivers (CAN, I2C, Ethernet) and so I expect that CAN, I2C & Ethernet interrupts will run from Core 1 and so may block each other?
Who uses Core 0? The documentation says 'system tasks', what are the 'system tasks'?
Can I prioritise interrupts? The I2C interrupt for example may take a low level. I imagine Ethernet is well DMA buffered and would be happy on a lower priority.
What else should I look at?
I am seeing CAN overrun errors. The CAN device has buffering for around 5 or 6 RX frames. At 250Kbps thats 500uS per or 2.5mS total. That seems a long time to be locked out.
As I understand it app_main() is launched from Core 1.
My app_main() creates the drivers (CAN, I2C, Ethernet) and so I expect that CAN, I2C & Ethernet interrupts will run from Core 1 and so may block each other?
Who uses Core 0? The documentation says 'system tasks', what are the 'system tasks'?
Can I prioritise interrupts? The I2C interrupt for example may take a low level. I imagine Ethernet is well DMA buffered and would be happy on a lower priority.
What else should I look at?