1980367_en-US

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

1980367_en-US

1980367_en-US

FlexCAN Receiving message Frames from PCAN GUI to S32K358 board

Hi @Senlent 

I have been working on the FlexCAN RTD driver to send and recieve message using my S32K358 Board. I am using the TJA443 chip connected to theFLEXCAN2 instance RX and TX at PTC7 and PTC6 respectively. I am also using the PTB11, PTC12 and PTC16 pins for the can chips EN,STB and ERR pins respectively.

Right now i am able to transmited CAN frames to the CAN analyer tool PCAN from my Board. I have set the FLEXCAN2 instance to Normal mode. I am also able to see the CANH, CANL and the TX-RX waves in the scope.

I am trying to get the CAN frames from the CAN analyser tool PCAN to my board. I have set the FLEXCAN instance to Listen mode and enabled the legacy RX fifo with default configuartions. Whenever i run the code, i get to the CANH, CANL and the TX-RX waves in the scope, but not able to decode the data. When i add the rxdata var in the expressions window, it shows that the data is not set.

In the PCAN tool i am transmitted the data (STD CAN frame),

soumik1506_0-1729700104365.png

When i connect the differential probe across the CAN_H and CAN_L pins of the TJA1443 chip, i am getting the differential CAN wave, but the not data was decoded. I tried decode the CAN_H and CAN_L waves seperately, still no data decoded.

Please find the attached project and please tell me and help me understand where i have missed out. I am pressed with time

BR,


Soumik

Re: FlexCAN Receiving message Frames from PCAN GUI to S32K358 board

It was an error from my end, my settings in the scope were not right, i have changes from high trigger to a low trigger mode and i am getting the decoded data. Sorry for the misinformation

Re: FlexCAN Receiving message Frames from PCAN GUI to S32K358 board

Hi@soumik1506

Please provide your project and I can help you check if the clock is correct.
If your PCAN can receive information from the S32K358 end, then there should be no problem with the communication.

Re: FlexCAN Receiving message Frames from PCAN GUI to S32K358 board

I have set to normal mode like you said, i am not getting any error logs in the PCAN GUI, but still not able to decode in the scope (SOF, DLC,DATA,etc). I have made sure that the baudrate and sample rate set in the project and in the scope are the same. I am just able to identify the bits where i am setting it high and low.

soumik1506_0-1729758536419.jpegsoumik1506_1-1729758559055.jpeg

Following are my flexcan configurations:

soumik1506_2-1729758701221.png

Please tell me what i am missing out here clearly.

Re: FlexCAN Receiving message Frames from PCAN GUI to S32K358 board

Hi@soumik1506

yes, you must set the flexcan to normal mode otherwise it won't able send any messages or response to bus.

Re: FlexCAN Receiving message Frames from PCAN GUI to S32K358 board

Thanks @Senlent for your reply. If this is the case, the how do i send the the data to my board? Should i set to normal mode and then send the data from the PCAN GUI?

Re: FlexCAN Receiving message Frames from PCAN GUI to S32K358 board

Hi@soumik1506

If the node is set to listen-only mode, then the node will not send ACK to the CAN bus network.

Therefore, in your case, there are only two nodes on the network, and one of them is set to

listen-only mode, so any message sent by your PCAN will not get a correct response.

Senlent_0-1729733984314.png


Tags (1)
No ratings
Version history
Last update:
‎11-21-2025 03:52 PM
Updated by: