How to enable hardware flow control (rs485)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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.
- Labels:
-
STM32MP15 Lines
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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)
![](/skins/images/3B802B20E5B9FCB8AFED4D71677E66F5/responsive_peak/images/icon_anonymous_message.png)