Skip to main content
Visitor II
May 2, 2023
Question

How to activate FDCAN in production mode

  • May 2, 2023
  • 3 replies
  • 1956 views

Dear ST Community,

I'm working with fdcan on stm32mp157d-dk1, the fdcan works properly in engineering mode, but i have an issue when in production mode, I found that I have to add the fdcan to the device tree,

then I tried to compile the dts generated by CubeMx in order to activate fdcan but i'm getting an error : "syntax error

FATAL ERROR: Unable to parse input tree"

I've used the dts from this link : https://github.com/STMicroelectronics/arm-trusted-firmware/blob/v2.6-stm32mp/fdts/stm32mp15xx-dkx.dtsi#L254

and other dts from other project but i'm getting the same problem

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    May 2, 2023

    Hi @BJlou.1​ 

    As you are talking about engineering mode, I assume the FDCAN is control by Cortex-M4.

    So, you need to inform Linux of that. Cortex-A7 is responsible of root clock setup and pin muxing even if IP is managed by Cortex-M4.

    e.g.

    &m4_m_can1{
    	pinctrl-names = "default";
    	pinctrl-0 = <&m4_fdcan1_pins_mx>;
    	status = "okay";
     
    	/* USER CODE BEGIN m4_m_can1 */
    	/* USER CODE END m4_m_can1 */
    };

    &m_can1 node must be kept "disabled" (default)

    https://wiki.st.com/stm32mpu/wiki/How_to_assign_an_internal_peripheral_to_a_runtime_context

    Regards.

    BJlou.1Author
    Visitor II
    May 2, 2023

    thank you for responding,

    Actually I am already aware of this particular point.

    I am encountering the error while trying to compile the device tree using the ST image kernel source. Specifically, when running the "make dtbs" command to generate the .dtb file, an error occurs.

    I'am getting this error : "syntax error

    FATAL ERROR: Unable to parse input tree"

    Technical Moderator
    June 6, 2023