DHCOM STM32MP1 Linux: Difference between revisions
From Wiki-DB
Jump to navigationJump to search
Ageisreiter (talk | contribs) Created page with "== Kernel Userspace Interfaces to Access Hardware == === RS-485 on picoITX === === CAN interface ===" |
Ageisreiter (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
=== RS-485 on picoITX === | === 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> | |||
|} | |||
=== CAN interface === | === CAN interface === |
Revision as of 06:34, 9 April 2020
Kernel Userspace Interfaces to Access Hardware
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