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),
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
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
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.
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.
Following are my flexcan configurations:
Please tell me what i am missing out here clearly.
yes, you must set the flexcan to normal mode otherwise it won't able send any messages or response to bus.
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?
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.