cancel
Showing results for 
Search instead for 
Did you mean: 

FDCAN Retransmission without blocking Bus

MStud.4
Associate

I have a CAN Network with several nodes. Each nodes sends only a ACK when the message was ment for it. Lets say I have nodes A, B and C.

Node A wants to send the message with ID 0x5. Node B ignores this message. Node C accepts this message (sends Ack). But currently, Node B is sending a burst of messages with ID 0x4.

What I have learned so far is, that I must have "Automatic Retransmission" on, else in this scenario, when Node A is trying to send the message and is loosing the Arbitration phase, it deletes the message. With "Automatic Retransmission" on, it sends the message as soon as the bus is free again.

Now the problem: Supose now node C gets disconnected from the network. With "Automatic Retransmission", node A spams the bus forever, since there is no Ack for the message. Now no message with higher ID than 0x5 can be sent anymore.

I want that node A resends the message after it lost in Arbitration phase, but that the bus does not get spammed forever if there is no Ack. How can I achieve that?

The MCU is G0B1KE with FDCAN.

I tried to do something with the Tx Event Fifo, but the callback never gets called. (I activated FDCAN_IT_TX_EVT_FIFO_NEW_DATA | FDCAN_IT_TX_COMPLETE | FDCAN_IT_RX_FIFO0_NEW_MESSAGE | FDCAN_IT_TX_EVT_FIFO_ELT_LOST but the HAL_FDCAN_TxEventFifoCallback is never called. However, the HAL_FDCAN_TxBufferCompleteCallback gets called, so I dont think it is a problem with interrupt config etc)

0 REPLIES 0