CAN Transmission stops after long run

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CAN Transmission stops after long run

3,242 Views
qazx
Contributor III

Hi team,

During the long run of our software the CAN transmission stops due to respective interrupt flag(IFLAG1) not getting set.

Please find the details below:
Microcontroller (ECU) - S32K342

CAN configuration - 1 Tx message buffer, Enhanced Rx FIFO enabled, CAN-FD(500kbps/2Mbps), Tx/Rx handling by polling.

Test setup:
1.there are 2 nodes in the network, ECU and CANalyzer.
2.Frames are being transmitted from both nodes (ECU -3 Messages and CANalyzer 5 Messages)


Issue Description:
when we start the communication between the 2 nodes, its observed that the ECU stops transmission of messages after about 17 to 18 hours.
But at the same time reception of messages are still fine.
On further debugging we noticed that at the time of failure, respective interrupt flag(IFLAG1) not getting set.
Also, when we repeat this test at a very high bus load(90%), we could see this issue at a short time(around 1hour).
One more observation is When the issue occurs, if we stop and restart the CANalyzer(alone) again, the ECU starts Transmitting its messages properly.

Could you please suggest what could be a reason for this issue(IFLAG IS not setting).
Let me know if you need any information on this.

 

Tags (1)
0 Kudos
11 Replies

3,222 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

please try to check if any error is detected at a time of the issue, see ECR/ESR1 registers. Also check a value of CODE field of used TX MB. MB flag is set upon successful transmission without error detected.

BR, Petr

0 Kudos

3,206 Views
qazx
Contributor III

Hi Petr,

We observed that on a successful transmission register values and CAN stopping time.

successful transmission:

Venukumar_0-1701537468628.png


CAN stopping time:

Venukumar_0-1701537572485.png



Below I'm attaching the whole register dump of CAN also, it will help to narrow down the issue.

0 Kudos

3,138 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

thanks for some info, but check as well MB are is some MB is prepared for transmission.
From given register dump I only see for stop time case a module is receiving a message. This could be normal condition, or maybe bus is held dominant somehow. Not sure if analyzer can do it, but you wrote restarting analyzer the MCU transmission is restored. You can try to measure bus signals as well as TXD/RXD lines to find more for this stuck condition.

BR, Petr

0 Kudos

2,953 Views
qazx
Contributor III

Hi Petr,

For this "CAN stopping after long run", we did some changes in the code.

We Reinitialize the "CAN hardware module", when it stops the signals transmission from the ECU, then it's started working.

How to avoid this "CAN Transmission stops after long run"

0 Kudos

2,913 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

maybe it is some SW issue, when it starts working again after you reinit module. What kind of driver do you use? To say more give CS word content of TX MB as well, as I wrote.

BR, Petr

0 Kudos

2,910 Views
qazx
Contributor III

Hi Petr,

We are using this CAN driver --> CanTrcv_30_Tja1043
From driver to application, we are using Vector SIP.
0 Kudos

2,886 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if you have Vector driver then, I think, it would be better to ask them directly.
From the info you given it is not possible to identify a root cause. Generally if you have prepared TX MB for transmission, and it was selected by internal arbitration, then it is transmitted on first opportunity window on the bus. The MB flag is set if message is transmitted successfully without error detected, with error detected it will be retransmitted automatically unless it is aborted by user. So you should check for above conditions.

BR, Petr

0 Kudos

2,883 Views
qazx
Contributor III

Hi Petr,

What kind of error you are mentioning, if error ocured(Bit , stuff,) like that

0 Kudos

109 Views
nikhillemos1
Contributor II

Hi @qazx ,

We are facing a similar issue with our application as well. Were you able to find the reason behind the bus dropping off like that? Also how are you defining when to reinitialize the CAN driver in your application?

Thanks,

Nikhil

0 Kudos

105 Views
qazx
Contributor III
Hi Nikhil,
I got a solution from vector team for this problem. So you can connect with your vector team support. They updated the driver code
for the mailboxes --> CAN_30_FLEXCAN4_LOCAL_MAILBOX_ACCESS

0 Kudos

2,880 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

any error detected (bit, stuff, ack,..., see ESR1 register)

BR, Petr

0 Kudos