FlexCAN Module not able to send the data on CAN Bus

cancel
Showing results for 
Search instead for 
Did you mean: 

FlexCAN Module not able to send the data on CAN Bus

85 Views
Kallappa
Contributor II

Hello NXP, I am trying to use the FlexCAN Module with s32k148 Board and send the data via the CAN Bus but data is not able to send on the bus. I attached the code, let me know if something is missing in the configuration.

0 Kudos
5 Replies

71 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Kallappa,

There are two FlexCAN examples in S32 SDK that you can refer: can_pal_s32k148 and flexcan_encrypted_s32k148

For example: Please read the documentation of can_pal_s32k148  first.

can_pal_s32k148.png

The example documentation can be found in the S32 SDK documentation at Examples and Demos section. (<SDK_PATH>/doc/Start_Here.html)

CAN PAL S32K148EVB.png


Then configure the PCAN-Pro according to the FlexCAN configuration:
CAN                      FD
Arbitration Phase  500Kbps
Data Phase          1000Kbps

After press SW3 and SW4, the PCAN-Pro will show the CAN message sent from S32K148EVB board 1.

can_pal_s32k148 CAN0 configuration.png

 

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

56 Views
Kallappa
Contributor II
Spoiler
 

Hello Robin,
Thanks for the Quick Support.
As  you suggested I went through the example of the FlexCAN encrypted and I am able to run the code successfully,
But for my use case, I slightly modified the main.c file, because I want to send on start one can message to other board.PFA attached main.c file.
But I am not able to get the data on CAN-BUS even I tried to send the data.

Can you please guide me in this what I missed here?

 

Thanks,

0 Kudos

47 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

flexcan_encrypted_s32k148.png

0 Kudos

17 Views
Kallappa
Contributor II

Hello Robin,

Thanks a lot for your great support.
now I am able to send the data on can BUS, it is creating interest now in learning the CAN in guidance of you.
Robin, now I want to receive the data as well for that I wrote the code as below attached the DOC.
but not able to receive the data, I was checking the receive buffer but the data is not updated in that buffer.

Kindly help me with this.

Once again thanks,
Kallappa

0 Kudos

84 Views
Kallappa
Contributor II



0 Kudos