cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup rs485 with linux,rs485-enabled-at-boot-time?

HLee.21
Associate III

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.

3 REPLIES 3
HLee.21
Associate III

*ping*?

Olivier GALLIEN
ST Employee

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

Olivier GALLIEN
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.
Gregory PLANCHON
ST Employee

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