2023-06-21 08:22 AM
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!
2023-06-22 02:54 AM
HI @Felix_Krag ,
that's should work usually without issue. Maybe few clues to check on your side
Regards.
2023-06-22 01:35 PM
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!
2023-06-23 01:53 AM
HI @Felix_Krag
did you have a look to this page ?
https://wiki.st.com/stm32mpu/wiki/Trace_and_debug_scenario_-_UART_issue
Regards.
2023-06-27 08:08 AM
No I haven't, I'll look into that, thanks!