cancel
Showing results for 
Search instead for 
Did you mean: 

How to activate FDCAN in production mode

BJlou.1
Associate II

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

3 REPLIES 3
PatrickF
ST Employee

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.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
BJlou.1
Associate II

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"

PatrickF
ST Employee

Hi @BJlou.1​ 

maybe go back to basics:

https://wiki.st.com/stm32mpu/wiki/Cross-compile_with_OpenSTLinux_SDK

https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Developer_Package

You might have missed some prerequisites.

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.