S32K312 CAN not working Normal mode

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

S32K312 CAN not working Normal mode

669 Views
rexoplans
Contributor III

Hello, I'm using the tja1055 as a transceiver. I'm facilitating two-way communication (meaning there's a receiver and a transmitter). I'm using the s32k312 as the processor. As a trial, I have a test code for receiving and transmitting in loopback mode. When I test this code, it works seamlessly. However, in normal mode, I'm not receiving the 'Receive callback.' I can see the signal of the message I send on the RX pin of the receiver transceiver. My message-sending code is a modified version of my loopback code, and my receiver code is the same code with the sending part turned off

0 Kudos
8 Replies

612 Views
sai-bodhanapu
Contributor I

Hello rexoplans,i am using s32k312 and configured CAN, are your interrupts configured correctly?, and it should be initialized to work the call_back functions properly, and do you have terminating resistor between the CAN low and CAN high pins?

saibodhanapu_0-1703233888999.png

 

0 Kudos

609 Views
rexoplans
Contributor III
"Hello, I believe interrupts are active because my callbacks are functioning properly in loopback mode. There are no termination resistors in between (I knew they weren't necessary at low speeds).
0 Kudos

647 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@rexoplans

1.please double check wether TJA1055 is right configured before use.

Senlent_0-1703211729939.png

 

0 Kudos

639 Views
rexoplans
Contributor III
Hello, I'm seeing VCC voltage when the line is idle (no messages are being sent). Doesn't this indicate that two transceivers are active and in normal mode? Also, I'm applying 1-1 values to the STB and EN pins. I'm seeing 12V on the INH pins of both transceivers (12 volts being my BAT voltage).
0 Kudos

633 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@rexoplans

1. Have you configured and initialized the pins correctly?

Senlent_1-1703230292780.png


2. If everything is configured correctly, then you can use tools such as an oscilloscope or logic analyzer to test whether the TX output on the MCU side has the correct output.


3. If the TX on the MCU side is normal, then solve the problem of TJA1055. Usually the STB and EN pins should be controlled by the MCU side.

Input requirements for STB and EN pins

Senlent_0-1703229281514.png

 

 

0 Kudos

629 Views
rexoplans
Contributor III
Im usign PTA6
.pinPortIdx = 6U;
.mux = PORT_MUX_AS_GPIO;
driveStrength = PORT_DRIVE_STRENTGTH_NOT_AVAILABLE;
.inputBuffer = PORT_INPUT_BUFFER_ENABLED;
.outputBuffer = PORT_OUTPUT_BUFFER_DISABLED;
.base = IP_SIUL2;
.safeMode = PORT_SAFE_MODE_DISABLED;
.inputFilter = PORT_INPUT_FILTER_NOT_AVAILABLE;
.pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED;
.slewRateCtrlSel = PORT_SLEW_RATE_NOT_AVAILABLE;
.pullKeep = PORT_PULL_KEEP_DISABLED;
.invert = PORT_INVERT_DISABLED;
.adcInterleaves[0U] = MUX_MODE_NOT_AVAILABLE;
.adcInterleaves[1U] = MUX_MODE_NOT_AVAILABLE;
.initValue = 2U;
.inputMuxReg[0U] = 0U;
.inputMux[0U] = PORT_MUX_ALT4;
0 Kudos

619 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@rexoplans

send me your project and i will help you check it next week.

0 Kudos

630 Views
rexoplans
Contributor III
Hello, my pin numbers are correct, but I'm not entirely sure about the pin configuration. Here's the situation: I'm observing output on the RX pin of the receiver card through the oscilloscope, and my signal appears correct. Shouldn't I not be seeing a signal if the transceivers weren't activated? My Tx pin configuration seems correct; I'll check on the configuration of my RX pin. In fact, I'll leave the configuration I've made below.
0 Kudos