S32G3 - FlexCAN Example Build for A53 Core on Linux

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

S32G3 - FlexCAN Example Build for A53 Core on Linux

Jump to solution
1,033 Views
MrAlexIV
Contributor III

Hi,

When I build the FlexCAN example project, I would like to obtain an .elf executable that runs on the A53 cores under Linux.
However, the example seems to be designed for the M7 core.

Is there a way to build or adapt the FlexCAN example so that it produces an executable .elf suitable for the A53 cores?

I also tried creating a new Application Project targeting A53 from scratch, but I'm not sure how to reuse or transfer all the FlexCAN configurations (peripherals, drivers, initialization code, etc.) into this new project.

Could you please guide me on how to achieve this?

0 Kudos
Reply
1 Solution
420 Views
MrAlexIV
Contributor III

I update the topic saying that I solved the issued using Goldvip's image.

View solution in original post

0 Kudos
Reply
7 Replies
421 Views
MrAlexIV
Contributor III

I update the topic saying that I solved the issued using Goldvip's image.

0 Kudos
Reply
1,021 Views
carlos_o
NXP TechSupport
NXP TechSupport

Hi @MrAlexIV 

Thanks for your question

With the A53 core running linux the use of modules like gpios, can, etc. is a bit different, instead of passing the values directly with the register like in a baremetal implementation or with an RTD (like with the M7 core). For a linux implementation a driver is needed to pass those values between the OS and the hardware, some of those drivers are already implemented with the BSP distribution that NXP gives. 

For the use of CAN with linux you could review the example that is given in the BSP User Manual

carlos_o_0-1753226320892.png

[Linux BSP 44.0 User Manual for S32G2 platforms]

 

the example is writing those commands in the linux console, you could do a C program that use the system() function to send commands and only execute your C code. 

0 Kudos
Reply
1,013 Views
MrAlexIV
Contributor III

Also, following the manual (I followed it for S32G3) it talks about J166, J169.....but on my board those Jumpers are not available. 

MrAlexIV_0-1753256274840.png

 

0 Kudos
Reply
1,015 Views
MrAlexIV
Contributor III

Thank you Carlos.
Ok I got your point. I followed your instructions, but in this way, I can only send and receive between can0 and can1. What I want, it's to receive or send to other device throug a CAN BUS (I have a CAN BUS where I connect all the devices ). With the FlexCan example, I could receive from the other devices, but if I just ldo candump can0, I can't receive the CAN messages from other devices.
The interface is not in loopback.
That's why I wanted to get the .elf for A53, because I have already tested the FlexCan example for M7 and it works.
I can use the simple candump can0 with the system() that you suggested, but it seems that I don't receive CAN messages from other devices.

MrAlexIV_0-1753255421094.png

 

0 Kudos
Reply
969 Views
carlos_o
NXP TechSupport
NXP TechSupport

Hi @MrAlexIV 

Could you share which board are you using? the connectors are mentioned in the image I share is for the S32G-VNP-EVB3 with the extension S32GRV-PLATEVB.

0 Kudos
Reply
966 Views
MrAlexIV
Contributor III
0 Kudos
Reply
772 Views
carlos_o
NXP TechSupport
NXP TechSupport

Thanks for sharing the board you are using.

For the GoldBox3, you need to enable the can0 and can1 nodes in the device tree. Within these nodes, you can configure which pins to use for CAN output. It’s important to ensure that the selected pins support can0 or can1 output in their SSS. 

You could review which pins you could use with the schematic of the board and S32G3_IOMUX.xlsx file that is attached in the reference manual (you need to open the RM with acrobat reader to see the attached files)

 

0 Kudos
Reply