DHCOR STM32MP1 Linux: Difference between revisions

From Wiki-DB
Jump to navigationJump to search
No edit summary
Line 2: Line 2:


'''CAUTION! THIS PAGE IS UNDER CONSTRUCTION!'''
'''CAUTION! THIS PAGE IS UNDER CONSTRUCTION!'''
== Devicetree Overlays ==
=== Aktivating Devicetree overlays ===
:Some of the hardware features can be activated with the help of a devicetree overlay. To activate a devicetree overlay, you have to boot into the bootloader. This can be done during the first seconds after startup, by simply hitting any button on a keyboard once the system tells you to do so.
:{| class="wikitable" align="center" |  style="color: #000000; background: #FFFFFF;" valign="top" |
|<tt>dh-stm32mp1-dhcor-avenger96 login: '''root'''</tt>
|}
=== Interacting with GPIOs ===
:An GPIO can be activated with the gpioset command. To find out which GPIO is connected to what gpiochip-device, take a look at the Hardware Section below.
:The GPIO "A" can be turned on by
:{| class="wikitable" align="center" |  style="color: #000000; background: #FFFFFF;" valign="top" |
|<tt>''# gpioset gpiochip0 14=1</tt>
|}





Revision as of 15:58, 12 August 2020


CAUTION! THIS PAGE IS UNDER CONSTRUCTION!


Devicetree Overlays

Aktivating Devicetree overlays

Some of the hardware features can be activated with the help of a devicetree overlay. To activate a devicetree overlay, you have to boot into the bootloader. This can be done during the first seconds after startup, by simply hitting any button on a keyboard once the system tells you to do so.
dh-stm32mp1-dhcor-avenger96 login: root

Interacting with GPIOs

An GPIO can be activated with the gpioset command. To find out which GPIO is connected to what gpiochip-device, take a look at the Hardware Section below.
The GPIO "A" can be turned on by
# gpioset gpiochip0 14=1



Linux Userspace Commands

Logging in after Startup

After booting, you con login as the user "root" without any password. Note, that the standard console is connected to the UART 1 Port (96Boards Name).
dh-stm32mp1-dhcor-avenger96 login: root

Interacting with GPIOs

An GPIO can be activated with the gpioset command. To find out which GPIO is connected to what gpiochip-device, take a look at the Hardware Section below.
The GPIO "A" can be turned on by
# gpioset gpiochip0 14=1
and off by
# gpioset gpiochip0 14=0

Unsing the internal RTC

Read out the current date and time of the system (not the RTC itself)
# 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:
# hwclock -s

Kernel Userspace Interfaces to Access Hardware

The pinmuxing of the DHCOR STM32MP1 can be configured just as needed by you as a customer and therefore the interfaces used in each configuration might be different. However, to give you an easy way to start developing with the DHCOR STM32MP1 you can use the Avenger96 Board, which is the reference design for our DHCOR module. Thus, the interfaces described here, are the configuration for the Avenger96.

Serial (UART) Interfaces

96Boards Name Linux Name Hardware Name
UART 0 /dev/ttySTM1 UART 7
UART 1 /dev/ttySTM0 UART 4

I²C Interfaces

96Boards Name Linux Name Hardware Name
I2C0 /dev/i2c-1 I2C2
I2C1 /dev/i2c-0 I2C1
OnBoard /dev/i2c-2 I2C4


microSD and eMMC

96Boards Name Linux Name Hardware Name
?????????? ?????????? ??????????
?????????? ?????????? ??????????
?????????? ?????????? ??????????

GPIOs

96Boards Name Linux Name Hardware Name
A gpiochip0 14 PA14
B gpiochip1 11 PB11
C gpiochip2 3 PC3
D gpiochip3 8 PD8
E gpiochip3 14 PD14
F gpiochip3 15 PD15
G gpiochip5 12 PF12
H gpiochip5 13 PF13
I gpiochip0 12 PA12
J gpiochip1 5 PB5
K gpiochip0 11 PA11
L gpiochip1 13 PB13


Beside the GPIOs, the Avenger96 has also four user LEDs, which are controlled the same way as the GPIOs.
96Boards Name Linux Name Hardware Name
LED 0 gpiochip9 7 PZ7
LED 1 gpiochip5 3 PF3
LED 2 gpiochip6 0 PG0
LED 3 gpiochip6 1 PG1