2021-06-16 07:24 AM
Hi All,
i am using stm32mp1 cpu,, recently i m facing floating rx issue on debug uart, with physical debug cable , i could default state of RX lines were pull up, and when i remove the cable, the RX lines is floating and its voltage fluctuates between 0.9-1.4 Volts,
when i power up unit, with out cable, the u-boot code waiting for receive events, i see the u-boot cancel the normal boot because (USART_ISR) lot of error were seen like noise, eob, cmf, Fe, bits , so most of error bit were set along with RDR data to read flag,
i am using FIFO enabled, with 16 byte rx buffer, tried with disabled fifo, still same problem
There is pull up is required, but can this be fixable in software u boot and kernel ? some thing like soft reset/ or any clear pending interrupts ?
Any suggestion would be helpfull
2021-06-22 03:14 AM
Hi,
sorry for later reply, did you progress on your issue ?
It is usual that in noisy environment, a floating pin could receive dummy data. An external pull-up of 4.7k is usually required to avoid this.
for industrial environment, an RC low pass filter could be added on RX lines (cutoff to be tailored to keep good signal integrity at required baud rate)
Alternatively to external pull-up, a internal pull-up could be enabled (typical value about 40K might not be low enough in case of strong noise and long wires).
in Device tree, internal pull-up could be enabled by adding bias-pull-up; on the related pinctrl for UART RX pin.
e.g. example generated by CubeMx for UART5 with pull-up enabled on UART5_RX pin.
uart5_pins_mx: uart5_mx-0 {
u-boot,dm-pre-reloc;
pins1 {
u-boot,dm-pre-reloc;
pinmux = <STM32_PINMUX('B', 13, AF14)>; /* UART5_TX */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
pins2 {
u-boot,dm-pre-reloc;
pinmux = <STM32_PINMUX('B', 5, AF12)>; /* UART5_RX */
bias-pull-up;
};
};
See also https://wiki.st.com/stm32mpu/wiki/Pinctrl_device_tree_configuration
Regards.
2021-06-22 08:33 AM
i am in still on 4.19 version, i tried bias-pull up still i see a usart is getting hang up..
2021-06-22 10:49 AM
any suggestion how to move usart console messages to ltdc frame buffer,
i have create /dev/fb0 console buffer and weston running on /dev/tty0
currently kernetl dts
aliases {
serial0 = &uart4;/*debug port*/
serial1 = &usart1;/*mj1--- ttySTM1*/
serial2 = &usart6;/*mj2-- ttySTM2*/
serial3 = &usart3;/*comm-- ttySTM3*/
serial4 = &uart8;/*mj3-- ttySTM4*/
ethernet0 = ðernet0;
};
chosen {
stdout-path = "serial0:115200n8";
};
where as cmd line boot args :
root=/dev/mmcblk0p6 rootwait rw console=ttySTM0,115200
2021-07-13 02:21 AM
Thanks Patric it solved issues.
2021-07-13 02:37 AM
In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'