CAN resource is not owned in the IMX8QM MEK as i am using imx-p9.0.0_2.0.0-ga version of code?

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

CAN resource is not owned in the IMX8QM MEK as i am using imx-p9.0.0_2.0.0-ga version of code?

5,071 Views
pooja1401
Contributor II

I am using imx-p9.0.0_2.0.0-ga version of IMX8QM MEK board. I want to enable the FLEXCAN resource . But in this version of code it is saying CAN resource is not owned. I am trying to enable in u-boot  changing status is "okay" but it is disabling the resource by reverting back the status. It is saying "Disabled CAN ,resource id not owned". I have tried to enable this in IMX8QXP MEK board also with imx-p9.0.0_2.0.0-ga latest version but in this also it is saying "resource not owned".

Kindly help me How to own Flexcan resource in this version imx-p9.0.0_2.0.0-ga as we need to use the latest version of code.

FYI In previous version imx-p9.0.0_1.0.0-ga this CAN resource is enabled by default.

I have tried to use mx8qm.scfw.tcm.bin  binary file of imx-p9.0.0_1.0.0-ga version of code with my version of code imx-p9.0.0_2.0.0-ga by replacing my mx8qm.scfw.tcm.bin file. But it is not booting with my code. I have read somewhere to change this scfw.bin file flexcan would work . So i have tried with working version of imx-p9.0.0_1.0.0-ga binary file. I am getting stuck at u-boot time.
Can anyone suggest or tell how this issue is resolved?

Can anyone tell how the flexcan resource is owned?

9 Replies

4,439 Views
pooja1401
Contributor II

Hi,

We found this one and changed the settings and it worked .

Thanks for your support .

4,440 Views
jack-cap
Contributor III

how to build scfw_tcm.bin ? thanks!

0 Kudos
Reply

4,439 Views
pooja1401
Contributor II

It has given on nxp site you can google it. or follow this link:-

https://community.nxp.com/docs/DOC-343178

0 Kudos
Reply

4,440 Views
jack-cap
Contributor III

modified as flows:

rm_set_resource_movable(pt_boot, SC_R_CAN_0, SC_R_CAN_2, SC_FALSE);

rm_set_resource_movable(pt_boot, SC_P_FLEXCAN0_RX, SC_P_FLEXCAN2_TX, SC_TRUE);

build scfw_tcm.bin and flash to emmc, I find that ifconfig command has can0-can2 result. but can send fail!

Is there anything else that needs to be modified ? Thanks.

0 Kudos
Reply

4,439 Views
manuelrodriguez
NXP Employee
NXP Employee

You need to delete the lines marking the resource AND pads as movable, OR change it to not mark it as movable, although that step is redundant since all pads/resources are marked as not movable at the top of the function:

/* Mark all resources as not movable */
BRD_ERR(rm_set_resource_movable(pt_boot, SC_R_ALL, SC_R_ALL,
SC_FALSE));
BRD_ERR(rm_set_pad_movable(pt_boot, SC_P_ALL, SC_P_ALL,
SC_FALSE));‍‍‍‍‍

I have updated the following document with an example doing this:

https://community.nxp.com/docs/DOC-341481 

Any support, information, and technology (“Materials”) provided by NXP are provided AS IS, without any warranty express or implied, and
NXP disclaims all direct and indirect liability and damages in connection with the Material to the maximum extent permitted by the applicable
law. NXP accepts no liability for any assistance with applications or product design. Materials may only be used in connection with NXP
products. Any feedback provided to NXP regarding the Materials may be used by NXP without restriction.
0 Kudos
Reply

4,440 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Pooja,

I guess FlexCAN resource was moved in SCFW since imx-p9.0.0_1.0.0-ga (L4.14.78 kernel).

 

Could you please check if the FlexCAN node is enabled (status = "okay") in kernel?

If so, could you please try setting the CAN resource as non-movable in SCFW source code and building it again?

Change:

   rm_set_resource_movable(pt_boot, SC_R_CAN_0, SC_R_CAN_2, SC_TRUE);

To:

   rm_set_resource_movable(pt_boot, SC_R_CAN_0, SC_R_CAN_2, SC_FALSE);

This line sets the CAN resources as non-movable so this won't be assigned to M4 owner.

 

Let me know if this works.

0 Kudos
Reply

4,280 Views
shabna_m
Contributor III

@Bio_TICFSL 

I have downloaded imx-scfw-porting-kit-1.2 for imx-4.14.98-2.0.0_ga (is that the correct pair?) and
removed the following lines from the board.c:
 
BRD_ERR(rm_set_resource_movable(pt_boot, SC_R_CAN_0, SC_R_CAN_2, SC_TRUE));
BRD_ERR(rm_set_pad_movable(pt_boot, SC_P_FLEXCAN0_RX, SC_P_FLEXCAN2_TX, SC_TRUE));
 
Build the scfw_tcm.bin and copied it to the imx8qmek .
 
Checked flexcan is enabled in dts of u-boot as well as in kernel.
In menuconfig also, it is enabled.and run bitbake fsl-image-qt5-validation-imx.
 
Booted the Image from sdcard. 
In the bootlog the following logs disappeared.
 
Disable can@5a8d0000, resource id 105 not owned
Disable can@5a8e0000, resource id 106 not owned
Disable can@5a8f0000, resource id 107 not owned.
 
But Ifconfig -a didn't list the can interfaces.
 
Please help me on this
0 Kudos
Reply

4,225 Views
shabna_m
Contributor III

@@Bio_TICFSL 

Hi,

I think, for the working of CAN we need i2c@3b230000 also.

But it is disabled from the bootloader. Log as follows

Disable i2c@3b230000, resource id 308 not owned.

Could someone please help to get it enabled in the linux partition?

0 Kudos
Reply

4,440 Views
pooja1401
Contributor II

Hi,

I have tried to use mx8qm.scfw.tcm.bin  binary file of imx-p9.0.0_1.0.0-ga version of code with my version of code imx-p9.0.0_2.0.0-ga by replacing my mx8qm.scfw.tcm.bin file. But it is not booting with my code.

Can anyone please help me how to resolve this issue? How i can use other scfw.bin file with my code?

Please reply as soon as poosilobe.

0 Kudos
Reply