2020-03-23 12:54 AM
I am using the STM32MP157C-DK2 board. I fixed the stm32mp157a-dk1 file as shown below
Generated the device tree blobs (* .dtb) and updated the device tree blob on the board.
I sent an echo "hello!" > /dev/ttySTM1
and I see that the RTS pin is held for too long, I think that this pin is held all the time while the file is open by the operating system.
Then I launched the Modbus-RTU test application. reception and transmission work correctly, but the RTS pin does not switch. The RTS pin was pressed to the ground when I launched the application and released when I closed the application.
How to enable hardware flow control (rs485)?
Solved! Go to Solution.
2020-03-25 06:12 AM
I found the answer here https://www.kernel.org/doc/Documentation/serial/serial-rs485.txt. it was necessary to fill out the rs485conf structure and call ioctl (fd, TIOCSRS485 and & rs485conf)
2020-03-23 07:50 AM
Hi @ASido
As first assumption your problem looks similar to this post :
https://community.st.com/s/question/0D50X0000BQOvVxSQL/cant-get-the-rts-line-working-on-stm32mp1-in-linux-stm32mp157cdk2
"st,hw-flow-ctrl;" properties missing in your Device Tree ?
Can you please tell me which version of OpenSTLinux you are using ?
Thanks,
Olivier
2020-03-23 10:44 PM
Hi OlivierG (ST Employee)
>As first assumption your problem looks similar to this post :
yes i saw this post
>"st,hw-flow-ctrl;" properties missing in your Device Tree ?
yes, it was seen in my question
>Can you please tell me which version of OpenSTLinux you are using ?
1.2.0
I did as it is written here: https://wiki.st.com/stm32mpu/wiki/Serial_TTY_device_tree_configuration#Activation_of_a_USART_or_UART_instance and https://wiki.st.com/stm32mpu/wiki/How_to_use_TTY_with_User_Terminal#Purpose
Reception and transmission are working correctly, but the RTS output is not working properly. this can be seen in the screenshots in my question
2020-03-25 06:12 AM
I found the answer here https://www.kernel.org/doc/Documentation/serial/serial-rs485.txt. it was necessary to fill out the rs485conf structure and call ioctl (fd, TIOCSRS485 and & rs485conf)