S32K344 Evaluation Board FlexCan Example running

cancel
Showing results for 
Search instead for 
Did you mean: 

S32K344 Evaluation Board FlexCan Example running

1,118 Views
dsantxez
Contributor I

I am trying to run the Flexcan example with the evaluation board. The program compiles and runs as it should, however, never apears in the CAN interface.

I have added the IO configuration code line and checked that the CAN configuration is not in loopback mode and that the FlexCAN0 pins are the ones stated in the Evaluation Board PDF

S32K3X4EVB-Q257_HW-UM.pdf 

I have checked the CAN_L and CAN_H lines and 120Ohms are there, enough to get CAN communication with a short cable. The configuration of the EVAL board is at 500kbps and CanAnalyzer is setup to 500kbps as well.

 

Anyone could give me a hint to what is missing?

0 Kudos
8 Replies

191 Views
fxn
Contributor I

Hi All,

I try your code but "CAN" still can't work, I can't measure the wave in can_tx.

Could you email sample code with IDE setting to me? Thanks a lot!

my email: jeff09051006@hotmail.com

Tags (1)
0 Kudos

180 Views
fxn
Contributor I

Hi Sir,

I attach my project for you easy checking. Thanks.

0 Kudos

1,106 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

there is secure transceiver TJA1153 connected to the MCU on the board. When no configuration is stored in non-volatile memory of the TJA1153, it does not allow the MCU to communicate with the CAN bus. It awaits configuration. Depending on the STB_N level the configuration needs to be sent via the bus from remote or via pin TXD.
STB_N=L, then configuration must come from local host via the TXD pin
STB_N=H, then configuration must come from remote node via the CAN bus
I will sent you simple example showing basic transceiver init.

BR, Petr

0 Kudos

1,090 Views
JoDo
Contributor III
Hello, @PetrS I have the same problem as @dsantxez can I also get the sample with working TJA1153
0 Kudos

1,059 Views
dsantxez
Contributor I

Hi,

I have tried to convert the plain setup example in plain to Flex API. I send this the messages that appear in the example and control de pin that enables setup mode, but with no success.

Could you check to see what I am doing wrong?

Thank you in advance,

Denis

0 Kudos

1,044 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

you are controling wrong pin for STB_N and prepare payload incorrectly.
See attached main.c for changes.

BR, Petr

0 Kudos

1,012 Views
JoDo
Contributor III

Hello,

I tried to use an external transceiver for CAN0 and wanted to use other pins than PTA6/7 Rx/Tx. So I selected PTF21/20 Rx/Tx and genereated new code,but when I run the program there is no response to them. I checked the pin connection by using it as GPIO and blink test.

When I use PTA6/7, I can see the message with an oscilloscope and my external transceiver also sends the correct message.

Is there any other configuration that should be done?

0 Kudos

960 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

did you set respective IMCR register for RX pin as well? That is IMCR[0]=5.

To test proper pin setting for FlexCAN, connect TX and RX pin together without transceiver and send a message. You should see message transmitted still.

BR, Petr

0 Kudos