cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling UART7 disables USART3 (STM32MP157F-DK2)

Felix_Krag
Associate II

Hi!

I've been running an embedded linux (built with Buildroot) on a STM32MP157F-DK2. I need to use both USART3 and UART7 ports to interact with other devices.

I've used it flawlessly with only USART3 enabled in linux's device tree for months. Recently, I've enabled UART7 in the device tree and USART3 suddenly stopped working (always getting a "resource busy" message when writing or reading from it).

Rolling back the UART7 modification fixes the issue every time. No error messages appear during build or on boot.

Here's a sample of the .dtsi file:

 

&uart4 {
	pinctrl-names = "default", "sleep", "idle";
	pinctrl-0 = <&uart4_pins_a>;
	pinctrl-1 = <&uart4_sleep_pins_a>;
	pinctrl-2 = <&uart4_idle_pins_a>;
	status = "okay";
};

&uart7 {
	pinctrl-names = "default", "sleep", "idle";
	pinctrl-0 = <&uart7_pins_c>;
	pinctrl-1 = <&uart7_sleep_pins_c>;
	pinctrl-2 = <&uart7_idle_pins_c>;
	status = "disabled";
};

&usart3 {
	pinctrl-names = "default", "sleep", "idle";
	pinctrl-0 = <&usart3_pins_c>;
	pinctrl-1 = <&usart3_sleep_pins_c>;
	pinctrl-2 = <&usart3_idle_pins_c>;
	uart-has-rtscts;
	status = "okay";
};

 

This code works when building the project, but changing the &uart7's 'status="disabled"' to 'status="okay"' is what causes the problem.

UART7 ports are part of the Arduino interface, could that be part of the problem?

Thanks!

4 REPLIES 4
PatrickF
ST Employee

HI @Felix_Krag ,

that's should work usually without issue. Maybe few clues to check on your side

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.
Felix_Krag
Associate II

Hi @PatrickF,

I've validated there are no pinctrl conflicts with all ports and there are no aliases conflicts.

When you say error/warning logs, do you mean on boot or when building? I've made sure there are none on boot, but there could be some well hidden when building.

Thanks!

PatrickF
ST Employee

HI @Felix_Krag 
did you have a look to this page ?

https://wiki.st.com/stm32mpu/wiki/Trace_and_debug_scenario_-_UART_issue

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.

No I haven't, I'll look into that, thanks!