DHCOR STM32MP1 Linux: Difference between revisions
From Wiki-DB
Jump to navigationJump to search
Created page with "Testpage under construction" |
No edit summary |
||
Line 1: | Line 1: | ||
Testpage under construction | Testpage under construction | ||
=== RS-485 on picoITX === | |||
:'''RS-485 device''' | |||
:{| class="wikitable" style="width: 400px" | |||
||DHCOM UART 2||<tt>/dev/ttySTM2</tt> | |||
|} | |||
:'''Compilation on target''' | |||
:{| class="wikitable" | |||
|<tt>''gcc tty_rs485_test.c -o tty_rs485_test''</tt> | |||
|} | |||
:'''Set tty device to raw mode''' | |||
:{| class="wikitable" | |||
|<tt>''stty -F /dev/ttySTM2 115200 cs8 raw -echo''</tt> | |||
|} | |||
:'''Send data with demo program''' | |||
:{| class="wikitable" | |||
|<tt>''echo -n -e "\n\rHallo RS485 Welt!" | ./tty_rs485_test /dev/ttySTM2''</tt> | |||
|} | |||
:'''Receive data with demo program''' | |||
:{| class="wikitable" | |||
|<tt>''./tty_rs485_test /dev/ttySTM2''</tt> | |||
|} | |||
:'''Download example source code''' | |||
:* [[media:Tty_rs485_test.zip | tty_rs485_test.c]] |
Revision as of 07:46, 22 July 2020
Testpage under construction
RS-485 on picoITX
- RS-485 device
DHCOM UART 2 /dev/ttySTM2
- Compilation on target
gcc tty_rs485_test.c -o tty_rs485_test
- Set tty device to raw mode
stty -F /dev/ttySTM2 115200 cs8 raw -echo
- Send data with demo program
./tty_rs485_test /dev/ttySTM2
- Receive data with demo program
./tty_rs485_test /dev/ttySTM2
- Download example source code