-
Notifications
You must be signed in to change notification settings - Fork 3
Description
There is a race condition/timing window which can cause a frame needing to be transmitted to get stuck in the software transmit queue.
Given that the software FIFO queue is empty and a frame is currently being transmitted by the ECAN this condition is checked at line 69. Then canTX() adds the frame to the queue at line 385.
Normally the queue is checked in the TX interrupt routine at line 439 but if the previous frame finished being sent before the current frame is added to the queue then the TX ISR will do nothing and then when the current frame is added to the queue the interrupt has been missed.
Recommended solution is to temporarily disable the TX interrupt between lines 369 and 85 in canTX().
Discovered whilst testing similar code in VLCBlib_PIC.