-
1. Re: Does the CAN-Controller looses messages when interrupts are off?
user_78878863 Nov 18, 2014 8:33 AM (in response to heiko.donat)Interrupts happening during a critical section should be triggered properly when that section has ended.
The only problem might be that the CAN controller might lose messages if the section takes to long to execute (but the same problem occurs when ISR execution as such takes too long).
-
2. Re: Does the CAN-Controller looses messages when interrupts are off?
bob.marlowe Nov 18, 2014 8:45 AM (in response to heiko.donat)You may play around with the interrupt priorities to avoid the need for critical sections. When CAN has got the highest priority (lowest number) no message will be lost.
Bob
-
3. Re: Does the CAN-Controller looses messages when interrupts are off?
heiko.donat Nov 18, 2014 8:50 AM (in response to heiko.donat)Actually, I would like to store the messages in a list which will be checked and changed in a main loop. I would like to keep it real time.
best regards,
HeDo
-
4. Re: Does the CAN-Controller looses messages when interrupts are off?
bob.marlowe Nov 19, 2014 4:29 AM (in response to heiko.donat)Data transmission is (even at high rates) comparatively slow compared to the CPU's speed.
Since the implementation of CAN is done in real hardware, this will keep on running when interrupts are disabled for a short time. Afaik there will an error-flag raised on an RX overrun, so that you have the chance to at least "see" a transmit error.
Storing messages in a list and handling in the main-loop does generally not conflict with other interrupt driven parts of your project.
Bob