2022-04-04 03:21 AM
This is how I would like to use rs485:
&usart3{
pinctrl-names = "default", "sleep";
pinctrl-0 = <&usart3_pins_mx>;
pinctrl-1 = <&usart3_sleep_pins_mx>;
status = "okay";
uart-has-rtscts;
linux,rs485-enabled-at-boot-time;
rs485-rts-delay-ns = <800 300>;
};
But it does not work.
The setup function stm32_usart_config_rs485() in drivers/tty/serial/stm32-usart.c does not get executed. This seems wrong. Could you elaborate on this?
When configuring rs485 from userland by using the ioctl, the setup function stm32_usart_config_rs485() does get executed and rs485 does work.
2022-05-06 02:21 AM
*ping*?
2022-05-31 01:31 AM
Hi @HLee.21 ,
Sorry for late reply.
This issue has been escalated internally as ticket #BZ129026 and is currently under analyze.
Keep you posted
Olivier
2022-06-07 12:57 AM
Hi @HLee.21 ,
I did some tests with the RS485 and it works for me.
The drivers uses stm32_usart_config_reg_rs485() and needs to be initialized before being used with the command "stty -F /dev/ttySTM1 2000000 -echo -icanon -onlcr" on the STM32 board and on the host by modifying the PATH.
I hope it can help you.
Do not hesitate to come back to me if necessary.
Grégory