DHCOR STM32MP1 Linux: Difference between revisions
From Wiki-DB
Jump to navigationJump to search
No edit summary |
|||
Line 6: | Line 6: | ||
=== Unsing the internal RTC === | === Unsing the internal RTC === | ||
:Read out the current date | :Read out the current date | ||
:{| class="wikitable" | :{| class="wikitable" align="center" | style="color: #000000; background: #FFFFFF;" valign="top" | | ||
|<tt>''# date</tt> | |<tt>''# date</tt> | ||
|} | |} | ||
:Set a specific system time | :Set a specific system time | ||
:{| class="wikitable" | :{| class="wikitable" align="center" | style="color: #000000; background: #FFFFFF;" valign="top" | | ||
|<tt>''# date -s "2020-01-30 10:00:00"</tt> | |<tt>''# date -s "2020-01-30 10:00:00"</tt> | ||
|} | |} | ||
:Save the current system time to the RTC of the STM32MP1 | :Save the current system time to the RTC of the STM32MP1 | ||
:{| class="wikitable" | :{| class="wikitable" align="center" | style="color: #000000; background: #FFFFFF;" valign="top" | | ||
|<tt>''# hwclock -w</tt> | |<tt>''# hwclock -w</tt> | ||
|} | |} | ||
:When you allready have stored a date on the RTC and you want to read it out, use the next command. This command only gives back the time, but does not synchronize it with the system time. This is done in the next step. | :When you allready have stored a date on the RTC and you want to read it out, use the next command. This command only gives back the time, but does not synchronize it with the system time. This is done in the next step. | ||
:{| class="wikitable" | :{| class="wikitable" align="center" | style="color: #000000; background: #FFFFFF;" valign="top" | | ||
|<tt>''# hwclock -r</tt> | |<tt>''# hwclock -r</tt> | ||
|} | |} | ||
:The system time can be synchronised to the RTC by this command: | :The system time can be synchronised to the RTC by this command: | ||
:{| class="wikitable" | :{| class="wikitable" align="center" | style="color: #000000; background: #FFFFFF;" valign="top" | | ||
|<tt>''# ??????????????????</tt> | |<tt>''# ??????????????????</tt> | ||
|} | |} |
Revision as of 09:19, 22 July 2020
PAGE IS UNDER CONSTRUCTION!
Linux Userspace Commands
Unsing the internal RTC
- Read out the current date
# date
- Set a specific system time
# date -s "2020-01-30 10:00:00"
- Save the current system time to the RTC of the STM32MP1
# hwclock -w
- When you allready have stored a date on the RTC and you want to read it out, use the next command. This command only gives back the time, but does not synchronize it with the system time. This is done in the next step.
# hwclock -r
- The system time can be synchronised to the RTC by this command:
# ??????????????????
- Unsing the internal RTC
- At first the time needs to be set:
Display current time # date Change time # date -s "2020-01-30 10:00:00"
- Next save the current time to the internal RTC:
Save the current time to the hardware clock # hwclock -w
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