Hello.
I've build a CAN Transmit Fifo, to send out CAN frames over a gateway to a second Can-Bus.
This is working fine in normal case.
But if there is the smallest little problem on the side with the Transmit Fifo (for example a little cable interruption)
and the transmit fifo is running over ( MOSTAT -> MSGLST is set)
the transmit fifo didn't start normal sending if the cable is connected again.
At normal working, the CUR position (MOFGPR-Register) of the receiving and transmitting node of the gateway changed synchron:
RX-CUR Node0: 5 TX-CUR Node1: 4
RX-CUR Node0: 6 TX-CUR Node1: 5 (next frame)
RX-CUR Node0: 7 TX-CUR Node1: 6 (next frame)
RX-CUR Node0: 8 TX-CUR Node1: 7 (next frame)
If the little little problem occured (no acknowledge for a short time)
and the little send problem is removed a smalle time later, the controller has MSGLST set and din't start sending.
If the next frame is received on node 0 and transfered to node 1 over the gateway,
node 1 is sending -> a: nothing or b: the old frame (if we have luck).
For example: in a msg object, there is TXRQ and NewDat set in MOStat (even TXEN0+TXEN1), but the Node isn't sending (bus is working, no bus load) !!!!
The Node/MSG-Object has time to send (1 Second) but isn't sending!!!
Here are example of the CUR positions:
RX-CUR Node0: 6 TX-CUR Node1: 0x0C (next rx frame without sending)
RX-CUR Node0: 7 TX-CUR Node1: 0x0C next rx frame without sending)
RX-CUR Node0: 8 TX-CUR Node1: 0x0C next rx frame without sending)
RX-CUR Node0: 9 TX-CUR Node1: 0x0C next rx frame without sending)
RX-CUR Node0: 0x0A TX-CUR Node1: 0x0C next rx frame without sending)
RX-CUR Node0: 0x0B TX-CUR Node1: 0x0C next rx frame without sending)
RX-CUR Node0: 0x0C TX-CUR Node1: 0x0C next rx frame without sending)
RX-CUR Node0: 0x0D TX-CUR Node1: -> Now the Node ist sending old Date from the last MSG-Objects at a burst.
RX-CUR Node0: 0x0E TX-CUR Node1: 0x0D (next frame with new Data)
RX-CUR Node0: 0x0F TX-CUR Node1: 0x0E (next frame with new Data)
RX-CUR Node0: 0x00 TX-CUR Node1: 0x0F (next frame with new Data)
RX-CUR Node0: 0x01 TX-CUR Node1: 0x00 (next frame with new Data)
...
Than Node 1 is stop working and start working again on CUR 0x0D (no bus off is set! RX is working, sending on a independing single tx msg object is working).
MOSTAT from the problematic msg object (lower 16 bits: 0x1A63 or 0x1B6B). PNext and PPrev in mostat is set correct in each msg object.
CUR, TOP and BOT in MOFGPR is correct.
If i clear TXRQ manually in the msg-objects where txrq is set, the Fifo isn't working correct again.
If i clear MSGLST manually where it is set, the Fifo isn't working correct again.
If i clear NewDat manually where it is set, the Fifo isn't working correct again.
If i clear and set TXEN1 in the msg object's, the Fifo isn't working correct again.
If i clear and set TXEN0 in the msg object's, the Fifo isn't working correct again.
If i clear and set MSGVAL in the msg object's, the Fifo isn't working correct again.
If i initialize the complete Fifo and gateway again, the Fifo isn't working correct again.
If i write the both CUR pointer (of RX and TX) to the start value, the Fifo isn't working correct again.
I seems, this is a big bug in the XMC4xxx chip.
Has anyone a Idea for a workaround from this chip bug?
I've build a CAN Transmit Fifo, to send out CAN frames over a gateway to a second Can-Bus.
This is working fine in normal case.
But if there is the smallest little problem on the side with the Transmit Fifo (for example a little cable interruption)
and the transmit fifo is running over ( MOSTAT -> MSGLST is set)
the transmit fifo didn't start normal sending if the cable is connected again.
At normal working, the CUR position (MOFGPR-Register) of the receiving and transmitting node of the gateway changed synchron:
RX-CUR Node0: 5 TX-CUR Node1: 4
RX-CUR Node0: 6 TX-CUR Node1: 5 (next frame)
RX-CUR Node0: 7 TX-CUR Node1: 6 (next frame)
RX-CUR Node0: 8 TX-CUR Node1: 7 (next frame)
If the little little problem occured (no acknowledge for a short time)
and the little send problem is removed a smalle time later, the controller has MSGLST set and din't start sending.
If the next frame is received on node 0 and transfered to node 1 over the gateway,
node 1 is sending -> a: nothing or b: the old frame (if we have luck).
For example: in a msg object, there is TXRQ and NewDat set in MOStat (even TXEN0+TXEN1), but the Node isn't sending (bus is working, no bus load) !!!!
The Node/MSG-Object has time to send (1 Second) but isn't sending!!!
Here are example of the CUR positions:
RX-CUR Node0: 6 TX-CUR Node1: 0x0C (next rx frame without sending)
RX-CUR Node0: 7 TX-CUR Node1: 0x0C next rx frame without sending)
RX-CUR Node0: 8 TX-CUR Node1: 0x0C next rx frame without sending)
RX-CUR Node0: 9 TX-CUR Node1: 0x0C next rx frame without sending)
RX-CUR Node0: 0x0A TX-CUR Node1: 0x0C next rx frame without sending)
RX-CUR Node0: 0x0B TX-CUR Node1: 0x0C next rx frame without sending)
RX-CUR Node0: 0x0C TX-CUR Node1: 0x0C next rx frame without sending)
RX-CUR Node0: 0x0D TX-CUR Node1: -> Now the Node ist sending old Date from the last MSG-Objects at a burst.
RX-CUR Node0: 0x0E TX-CUR Node1: 0x0D (next frame with new Data)
RX-CUR Node0: 0x0F TX-CUR Node1: 0x0E (next frame with new Data)
RX-CUR Node0: 0x00 TX-CUR Node1: 0x0F (next frame with new Data)
RX-CUR Node0: 0x01 TX-CUR Node1: 0x00 (next frame with new Data)
...
Than Node 1 is stop working and start working again on CUR 0x0D (no bus off is set! RX is working, sending on a independing single tx msg object is working).
MOSTAT from the problematic msg object (lower 16 bits: 0x1A63 or 0x1B6B). PNext and PPrev in mostat is set correct in each msg object.
CUR, TOP and BOT in MOFGPR is correct.
If i clear TXRQ manually in the msg-objects where txrq is set, the Fifo isn't working correct again.
If i clear MSGLST manually where it is set, the Fifo isn't working correct again.
If i clear NewDat manually where it is set, the Fifo isn't working correct again.
If i clear and set TXEN1 in the msg object's, the Fifo isn't working correct again.
If i clear and set TXEN0 in the msg object's, the Fifo isn't working correct again.
If i clear and set MSGVAL in the msg object's, the Fifo isn't working correct again.
If i initialize the complete Fifo and gateway again, the Fifo isn't working correct again.
If i write the both CUR pointer (of RX and TX) to the start value, the Fifo isn't working correct again.
I seems, this is a big bug in the XMC4xxx chip.
Has anyone a Idea for a workaround from this chip bug?