cancel
Showing results for 
Search instead for 
Did you mean: 

FDCAN Arbitration lost / LEC error doesn't handled with IRQ in DAR mode. Probably - the potential hardware bug.

EmbedMaster
Associate II

Hello guys.

I try to catch the IRQ of arbitration lost and error code in LEC in FDCAN in DAR (disabled auto retransmission) mode.

I have 3 devices in CAN network:

   STM32F207 - 2 pcs

   STM32H745Q (dev board) + external phy.

All devices works good. They succesfully sends and receieves packets. All IRQs are works too.

In 207 series I can catch arbitration loss and LEC error with the standard TC IRQ (RQCPx bit) and next determine the status of transmisson with TXOKx, ALSTx, and TERRx bits. The IRQ in NART mode works perfect.

To catch arbitration loss and LEC error in H7 series I should to configure TXBCIE, and IE registers. In this case the interruption should occur when the according bit in TXBCF register is set. But in DAR mode this bit doesn't affect to IR register and IRQ doesn't occur.

I tried to catch the real cancellation of transmission via TXBCR reg -> according bits in TXBTO and TXBCF was setted and IRQ occured. Ok, thats fine.

I returned to the task and tried to catch tx event. Unfortunatelly in DAR mode when transmission interrupts because of arbitration lost or error, tx event Fifo counter not incremented and handling of this irq doesn't occured. But I think, this behaviour is fine. Tx event waits for TXBTO bit..

So there is a problem:

In DAR mode the TXBCF bits doesn't set TCF bit in IR. Therefore the IRQ handler doesn't called.

The only way is to use while and wait for according bits in TXBTO and TXBCF registers. And then determine the status of the transmission with these bits and LEC code.

It's a pity..

0 REPLIES 0