Hi NXP,
I am using IMX8QM based custom board.
We are using 2CAN transceiver TJA1153 and 1 normal can transceiver.
In ifconfig -a i am able to see can0, can1 and can2. But CAN1 and CAN2 is showing bus error.
Normal mode operation (STB_N=H and EN=H)
Since it is an secure CAN transceiver, we are using following command for configuration with STB_N=H and EN=H from bus master sending msg_id:0x555 data:0x71 0x02 0x03 0x04 0x05 0x06 0x07 0x08
Even though i am getting bus error
also tried with STB_N=L using cansend can2 0x555#7102030405060708, even still i am getting bus error.
We are using yocto BSP version 5.10.35_2.0.0 Release.
Please let me know how to configure secure can transceiver.
Please find below schematic for the same.
device tree
reg_can1_en: regulator-can1-gen {
compatible = "regulator-fixed", "fsl,imx8qm-flexcan";
regulator-name = "can1-en";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
//gpio = <&lsio_gpio0 18 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
reg_can2_en: regulator-can2-gen {
compatible = "regulator-fixed", "fsl,imx8qm-flexcan";
regulator-name = "can2-en";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
//gpio = <&lsio_gpio0 4 GPIO_ACTIVE_HIGH>;
//enable-active-high;
};
reg_can0_stby: regulator-can0-stby {
compatible = "regulator-fixed", "fsl,imx8qm-flexcan";
regulator-name = "can0-stby";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
//gpio = <&lsio_gpio1 3 GPIO_ACTIVE_HIGH>;
//enable-active-high;
//vin-supply = <®_can01_en>;
};
reg_can1_stby: regulator-can01-stby {
compatible = "regulator-fixed", "fsl,imx8qm-flexcan";
regulator-name = "can1-stby";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
//gpio = <&lsio_gpio0 13 GPIO_ACTIVE_HIGH>;
//enable-active-high;
//vin-supply = <®_can01_en>;
};
reg_can2_stby: regulator-can2-stby {
compatible = "regulator-fixed", "fsl,imx8qm-flexcan";
regulator-name = "can2-stby";
//gpio = <&lsio_gpio0 3 GPIO_ACTIVE_HIGH>;
//enable-active-high;
};
&flexcan1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan1>;
xceiver-supply = <®_can0_stby>;
status = "okay";
};
&flexcan2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan2>, <&pinctrl_can1>;
xceiver-supply = <®_can1_stby>;
status = "okay";
};
&flexcan3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan3>, <&pinctrl_can2>;
xceiver-supply = <®_can2_stby>;
status = "okay";
};
pinctrl_flexcan1: flexcan0grp {
fsl,pins = <
IMX8QM_FLEXCAN0_TX_DMA_FLEXCAN0_TX 0x21
IMX8QM_FLEXCAN0_RX_DMA_FLEXCAN0_RX 0x21
IMX8QM_SCU_GPIO0_07_SCU_GPIO0_IO07 0x23
>;
};
pinctrl_flexcan2: flexcan1grp {
fsl,pins = <
IMX8QM_FLEXCAN1_TX_DMA_FLEXCAN1_TX 0x21
IMX8QM_FLEXCAN1_RX_DMA_FLEXCAN1_RX 0x21
>;
};
pinctrl_flexcan3: flexcan3grp {
fsl,pins = <
IMX8QM_FLEXCAN2_TX_DMA_FLEXCAN2_TX 0x21
IMX8QM_FLEXCAN2_RX_DMA_FLEXCAN2_RX 0x21
>;
};
pinctrl_can1: can1grp {
fsl,pins = <
IMX8QM_GPT1_CAPTURE_LSIO_GPIO0_IO18 0x00000020 //can1_en
IMX8QM_M41_GPIO0_01_LSIO_GPIO0_IO13 0x00000020 //can1_stb
IMX8QM_SIM0_RST_LSIO_GPIO0_IO01 0x00000020 //can1_wake
>;
};
pinctrl_can2: can2grp {
fsl,pins = <
IMX8QM_SIM0_POWER_EN_LSIO_GPIO0_IO04 0x00000020 //can2_en
IMX8QM_SIM0_PD_LSIO_GPIO0_IO03 0x00000020 //can2_stb
IMX8QM_SIM0_GPIO0_00_LSIO_GPIO0_IO05 0x00000020 //can2_wake
>;
};
Please let me know how to configure it and make it up.
How to write into non-volatile memory
Regards,
rahul
Hi NXP,
STB_N=H and EN=H.
Configuring from bus-master.
I sent configuration message with msg_id:0x555 dlc=3 50 32 AB
After above configuration, i sent msg_id:0x18DA00F1 dlc=5 60 18 DA 00 F1
0x18DA00F1 dlc=3 40 00 03
0x18DA00F1 dlc=3 50 32 AB
0x18DA00F1 dlc=6 10 00 18 DA 00 F2
Please let me know, how to configure device for TJA1153
After sending 0x555 50 32 AB dlc=3
i am able to see that
TX for 0x555 no bus error.
If i send 0x18DA00F1 10 00 18 DA 00 F2 i am getting bus error at bus-master.
Please help me on this.
Thanks and Regards,
Subramanya N M