IMX8qm-mek can0 using for J1939

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

IMX8qm-mek can0 using for J1939

965 Views
rahulM
Contributor IV

Hi NXP,

I am using CAN-0 for J1939 protocol,

I am not able to read CAN data and pgn from the busmaster.

I am using i.MX Linux Yocto Project BSP 5.4.47_2.2.0 Release.

I added can-utils in conf file and enabled CONFIG_CAN_J1939.

I referred https://github.com/linux-can/can-utils/blob/master/testj1939.c still not able to r/w.

Please share any sample J1939 linux based application code to read/write from the busmaster simulator.

Thanks and Regards,

Subbu

 

0 Kudos
2 Replies

956 Views
igorpadykov
NXP Employee
NXP Employee

Hi Subbu

 

If default images for Linux were used, please check if M4 was started. In affirmative case, CAN Resources are assigned to M4 and this can determine Linux CAN driver not to probe.

If this is the case, there are 2 possibilities:

1. M4 is not needed ==> use a flash.bin without M4 firmware (imx-boot-imx8qmmek-sd.bin-flash_linux)

2. Otherwise, M4 Resources has to be unassigned from M4 partition (board.c of SCFW).

Example can be found on below link  sect. "Modifying default configuration" :

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/System-Controller-Firmware-101-Resource-...

From Linux Kernel perspective, the nodes are enabled in dts:

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8qm-mek.d...

 

>Please share any sample J1939 linux based application code to read/write from the busmaster simulator.

 

sorry such example is not available.

 

Best regards
igor

0 Kudos

951 Views
rahulM
Contributor IV

Hi Igor,

I will check and update for the same.

Thanks for your support.

Regards,

Subbu

 

 

0 Kudos