S32K144 CAN

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

S32K144 CAN

1,077 Views
chenze
Contributor II

Hi,

          I am using CAN communication, and the transceiver is TJA1043A. In the communication process, I dropped the CAN line, and an error occurred. entered the callback function, read the ESR1 register, the value is 0x4040A, and then ran at full speed. The program ran to the breakpoint, and read the value of the ESR1 register is 0x24051A.

1.Why did no ACK error occur

2.Why did the current mistake occur

0 Kudos
5 Replies

1,061 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

what did you mean by "dropped CAN line"? Seems error is detected during receiving a message. What message is received. Is the CANFD enabled on module if CANFD is going to be received. Check also proper CAN bit timing and bus termination.

BR, Petr

0 Kudos

1,057 Views
chenze
Contributor II

Hi,

      I use standard CAN, and I am testing for ACK errors, but when I do not connect to the bus, no ACK errors occur。According to the CAN protocol, when a single node is used, the message cannot be sent, and an ACK error will be generated,but I have not read the ACK error

0 Kudos

1,033 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, if the module is disconnected from the bus and message is sent by module, the ACK error must be detected and TX error counter stops at 0x80 value.
You can test it without transceiver when CAN TX/RX pins are connected together. With transceiver connected, but disconnected from a bus, the behavior must be the same. Note, transceiver must be terminated.

BR, Petr

0 Kudos

1,022 Views
chenze
Contributor II

Hi,

What does "transceiver must be terminated"  mean?I don't understand the meaning of this sentence。I did the following experiments:

Experiment 1:With transceiver connected, but disconnected from a bus,ACK can be occured when CAN TX/RX pins are connected together.

Experiment 2:With transceiver connected and connected from a bus,ACK can be occured when CAN TX/RX pins are connected together.

Why CAN TX/RX pins connected together,ACK can be occured,but when CANH/CANL connected together,ACK cannnot be occured.

chenze_1-1671035405975.png

 

 

 

0 Kudos

1,009 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I meant that terminating resistors must be placed between CANH/CANL lines of transceiver.
BTW I can recommend to refer to AH1014 (https://www.nxp.com/docs/en/supporting-information/AH1014.pdf) for typical application connection and optional circuitry at CANH and CANL.
For your test not sure how did you understand "CAN TX/RX pins are connected together". If as normal connection to the MCU, or short of TX to RX. If the latter one, what I meant, this cannot be done with transceiver connected.

So first disconnect MCU's TX/RX pins from transceiver and do shorts of those TX RX. This way you test MCU pin setting, with sending a message you have to get ACK error. Then do normal connection to transceiver again and have transceiver disconnected from a bus. You have to get ACK error again. If you short CANH/CANL sending message is not possible. In all cases you can use oscilloscope to check signals.

BR, Petr

0 Kudos