Description DK/BL STM32 MP15x devices
Identification
This description is valid for Demo-Kits and Boards.
Demo-Kit
A Demo-Kit is a collection of components for a quick start with the product. It often contains
connectors, power plugs, housing and display based on a specific board and SoM.
Board
A board is a device without housing and peripherals. Different Demo-Kits may be based on the
same board if the housing is different.
Hint
- For a quick start with these kits see the Quickstart document.
- For connector interfaces and board layout see appendix
Demo-Kits (DK)
All Demo-Kits are based on specific boards. The following table shows the mapping between Demo-Kit and board.
Demo-Kit | Demo-Kit number | Board number | Description |
---|---|---|---|
DK 5" STM32 MP157 512MB/512MB | 50099044 rev00 | 40099 176 | Demo-Kit with STM32MP157A 5" Display and capacitive Touch |
DK STM32 MP157 512MB/512MB | 50099045 rev00 | 40099 176 | Demo-Kit with STM32MP157A, without Display |
Boards (BL)
Board | Board number | SoM number | Description |
---|---|---|---|
BL STM32 MP157 512MB/512MB | 40099 176 | 40099 167 | Board with STM32MP157A |
BL STM32 MP153 512MB/512MB | 40099 183 | 40099 180 | Board with STM32MP151A |
BL STM32 MP151 512MB/512MB | 40099 182 | 40099 180 | Board with STM32MP151A |
The PCB number can be found on the PCB for identification. For all boards the PCB number is
1 950 1825
.
Overview of board components and features
These boards consists of two main units. The SoM which is the more complex component including processor and DDR3-RAM. The second component is actually a baseboard including additional storage and containing all necessary connectors.
The compponents of the baseboard are:
- SoM soldered on the baseboard
- 4GB eMMC
- Micro SD card slot
- 2 x USB host
- 1 x USB OTG
- 1 x USB Ethernet (100 MBit/s)
- 2 x Ethernet Connector (RJ45)
- 1 x RS232
- 1 x RS485
- 1 x CAN
- 2 x Debug LEDs
- 2 x Digital IO
- 2 x Analog IN
- 1 x PWM beeper
- 4 x Configuration switches
- Display Interfaces: RGB or DSI with HDMI or LVDS converter
Display and Touch (only display variant)
- 5 inch display with 800x480 resolution
- capacitive multitouch
Software support
These devices are supported by the Kontron yocto BSP
Name | Shortname | Devicetree file | CubeMX configuration | housing | Remark |
---|---|---|---|---|---|
DK/BL STM32 MP157 512MB/512MB | t1000-k | stm32mp-t1000-k.dts | t1000-k.ioc | without display | |
DK 5" STM32 MP157 512MB/512MB | t1000-k-50 | stm32mp-t1000-k-50.dts | t1000-k.ioc | -50 | |
DK/BL STM32 MP153 512MB/512MB | t1005-k | stm32mp-t1005-k.dts | (1) | (2) | without display |
DK/BL STM32 MP153 512MB/512MB | t1005-k-50 | stm32mp-t1005-k.dts | (1) | -50 | |
DK/BL STM32 MP151 512MB/512MB | t1004-k | stm32mp-t1004-k.dts | (1) | (2) | without display |
DK/BL STM32 MP151 512MB/512MB | t1004-k-50 | stm32mp-t1004-k.dts | (1) | -50 |
- (1) A dedicated CubeMX configuration is not not available for these boards. These boards are
based on
t1000-k.ioc
, the differences (GPU, CAN) are handled in SoM device tree files directly. - (2) With the yocto machine configuration
stm32mp-t1000-k-multi
at1000-k
bootloader is used. Therefore you have to unset thehousing
variable and select the appropriate machine in the extlinux menu.
Important
Not every software version provides full support for all devices and all configurations. See the appropriate release note for more information.
Hint
It is possible to boot the t1000-k-50
configuration on all boards. This configuration is the
superset for all boards and the default delivery configuration for all DKs. When booting this
configuration on a board variant, some error messages will arise for the hardware components
which aren't available (e.g. GPU or CAN).
Important
The housing
variable in u-boot has to be set to select the correct kit configuration for the
board. See u-boot bootloader for more info.
Notice
The build repository base URL is https://git.kontron-electronics.de/stm32mp. It is recommended
to use the init-env
script to checkout and populate all yocto layers and to setup
the yocto environment for this device. See
initializing the yocto build environment
for more information
Yocto configurations
The dedicated software configurations for these Boards and Demo-Kits
build repository | build-stm32mp |
branches | thud, dunfell |
machine | stm32mp-t1000-multi |
init-env command | . init-env -t thud build-stm32mp |
EULA accept variable | ACCEPT_EULA_stm32mp-t1000-multi = "1" |
distros dedicated for these kits | ktn |
images dedicated for these kits | image-ktn, image-ktn-qt |
available boot devices | mmc0 (SD-card), mmc1 (eMMC), ubifs0 (QSPI NAND), pxe (Ethernet1) |
latest prebuild binaries | https://files.kontron-electronics.de/stm32mp |
Licence information
This product contains software components which are licensed as free respectively open-source software under the GNU General Public License, versions 2 or 3, or the GNU Lesser General Public License, versions 2.1 or 3 or any other open-source licence. Everyone can get the source code of this software components from us by download or by storage medium within three years after the delivery of the product or as long as we offer spare parts or support for the product.
To get the source code on a data storage medium (CD-ROM, DVD, USB drive), please send a request to our customer support at the following address
Kontron Electronics GmbH
Max-Planck-Strasse 6
72636 Frickenhausen
Deutschland
Web: www.kontron-electronics.de
E-Mail: support@kontron-electronics.de
Including the statement of the following product data:
- Product name and product number
- Date of delivery
We also require a fee of EUR 10,- for the costs of preparation of the medium and shipping to be transferred.
Preventive it should be mentioned here that using the right of installing own versions of the open-source software components, which is guaranteed in the licence contract, will expire all certifications and warranties of the product. The operation of the manipulated product will happen on one's own authority.
If you want to download the source code covered by open-source licenses for this product use these URLs:
- For getting binaries, license texts and source code:
https://files.kontron-electronics.de/stm32mp
Look for the appropriate BSP version in this directory or in the archive subdirectory. - For instructions how to build the software:
https://docs.kontron-electronics.de/stm32mp/build-stm32mp
Known issues and limitations
- HDMI and LVDS is limited in functionality. See display interfaces for further information.
Description of board components
The following sections describe the hardware components and, if available, their interface to to linux os.
Power supply
The power supply is located on X101. The nominal supply voltage is 24V. The average current for the board with display is lower than 200mA.
Boot switches
The boot source can be selected by boot switches on the top side of the baseboard.
Some remarks to the boot modes:
- As long as the STM32MP1 SOC has no USB connection in USB boot mode, LED1 blinks fast.
- The boards are delivered with SD boot setting.
For Demo-Kits this boot configuration is written in OTP memory:
BOOT_CONFIG3 = 0x22000000
Boot switch setting | Boot source search sequence |
---|---|
USB boot | USB OTG port waits for CubeProgrammer to send data |
SD boot | SD-card, NOR boot, USB boot |
NOR boot | SD-card, NOR boot, USB boot |
Debug | Wait for JTAG to load program to M4 |
So 'SD boot' setting and 'NOR boot' is equivalent and it is not possible to force the device to boot from NOR when a bootable SD card is in the SD card slot.
See ST Wiki for documentation of boot fuses settings.
Serial Interfaces
Also see Using the hardware.
STM32MP1 | Used as | Linux access | Connector | Usage |
---|---|---|---|---|
uart4 | console | /dev/ttySTM0 |
X202 (MiniUSB) | |
usart2 | RS485 | /dev/ttySTM1 |
X1201 | |
usart3 | RS232 | /dev/ttySTM2 |
X1201 |
Info
You need an additional adapter to translate the 3.3V console UART signals (provided on the Mini-USB port) to USB.
Hint
A termination resistor for the RS485 interface can be found on switch S1201. It is called 'RS485 TERM' and is switch number 6.
CAN Interfaces
Also see Using the hardware.
STM32MP1 | Used as | Linux access | Connector | Usage |
---|---|---|---|---|
can1 | CAN | SocketCAN:can0 |
X1201 |
Hint
A termination resistor for the CAN bus interface can be found on switch S1201. It is called 'CAN TERM' and is switch number 5.
Ethernet
Also see Using the hardware.
Name | Connector | Linux device | Remark |
---|---|---|---|
Ethernet 1 | X1001 | eth0 | Native SOC interface |
Ethernet 2 | X1101 | eth1 | USB ethernet, not available in u-boot bootloader |
Config Switches
The baseboard provides four configuration switches called 'CAN ADR 0-3` which are internally connected to the gpio bus expander of the SoM module.
The input signals can be accessed via standard GPIO sysfs interface /sys/class/gpio
or by
libgpiod (commands gpio*
).
Name | GPIO number (sysfs) |
Accessible via (libgpiod) |
Switch |
---|---|---|---|
CAN ADR0 | 1016 | gpiochip8 0 |
S1201 switch 1 |
CAN ADR1 | 1017 | gpiochip8 1 |
S1201 switch 2 |
CAN ADR2 | 1018 | gpiochip8 2 |
S1201 switch 3 |
CAN ADR3 | 1019 | gpiochip8 3 |
S1201 switch 4 |
Important
GPIO numbers may vary by Linux kernel configuration or by device configuration. For thud BSP (Linux kernel version 4.19) the base GPIO number for sysfs access is 504.
Digital IOs
Also see Using the hardware.
Two digital inputs/outputs (either or) are available. If used as output the state can be read back from the associating input.
The table below shows number and function of available GPIOs. You can access them via the standard
GPIO sysfs interface /sys/class/gpio
or by libgpiod (commands gpio*
).
Name | direction | GPIO number (sysfs) |
Accessible via (libgpiod) |
Connector |
---|---|---|---|---|
dout1 | output | 65 | gpiochip4 1 |
X1301_DIO1 |
din1 | input | 35 | gpiochip2 3 |
X1301_DIO1 |
dout2 | output | 34 | gpiochip2 2 |
X1301_DIO2 |
din2 | input | 11 | gpiochip0 11 |
X1301_DIO2 |
Analog inputs
There are two analog inputs available on the board, connected to the internal ADC
Name | Accessible via | Connector |
---|---|---|
AIN1 | /sys/bus/iio/devices/iio\:device0/in_voltage5_raw |
X1301_AIN1 |
AIN2 | /sys/bus/iio/devices/iio\:device0/in_voltage16_raw |
X1301_AIN2 |
For voltage calculation in mV from the raw value see STMicroelectronics Wiki The scaling formula for the board is:
Uconnector = Uadc * 11
For simplicity there is a adcread
script to read adc values which observes all offsets,
and scaling factors. To read out channel 5 on device adc 0 call:
> adcread 0 5
ADC0.5: 16 mV
The adcread
script uses entries adc-board-scale/adcX/channelX
to adapt the SOM
voltage range to the board range thru the provided scaling factor in device tree.
For Kontron stm32mp-t1000
based boards, both ADCs (adc0 and adc1) are assigned
to A7 context. adc1
provides some internal voltages whose connections are fixed
in SOC chip:
adc1
adc1 13 [VREFINT] (prescaler 1.0)
adc1 14 [VDDCORE] (prescaler 1.0)
adc1 15 [VBAT] (prescaler 4.0)
adc1 16 [DAC_OUT1] (prescaler 1.0)
adc1 17 [DAC_OUT2] (prescaler 1.0)
LEDs
There are 2 debug LEDs available and can be controlled by linux user space or are used by M4 demo program
Name | Interface | Accessible via | Used as |
---|---|---|---|
LED1 | SOC PORTA 13 | M4 demo | M4 demo LED |
LED2 | SOC PORTA 14 | /sys/class/leds/LED2 |
Linux heartbeat |
Hint
LED1 (PORT A13) is also used to indicate USB boot mode. When STM32MP1 waits for USB connection, LED1 blinks fast.
I2C busses
On this board there are two i2c busses used:
Name | Accessible via | Used by |
---|---|---|
I2C2 | i2c-1 | GPIO SOM, DSI2HDMI, DSI2LVDS |
I2C4 | i2c-2 | Touch |
Important
i2c-1 interface is internally used for GPIO port expander TCA6408A on SoM at address 0x20
Devices on i2c-1
Address | Location | Komponente |
---|---|---|
0x20 | SOM | GPIO port expander TCA6408A |
0x2c | SOM | SN65DSI84 DSI to LVDS converter |
0x38 | SOM | ADV7535 DSI to HDMI converter |
0x39 | SOM | ADV7535 DSI to HDMI converter |
0x3c | SOM | ADV7535 DSI to HDMI converter |
0x3f | SOM | ADV7535 DSI to HDMI converter |
Devices on i2c-2
Address | Location | Komponente |
---|---|---|
0x14 | Housing | Goodix touch |
USB host
Also see Using the hardware.
Two USB 2.0 host interfaces are available on connector X902.
USB OTG
Also see Using the hardware.
One USB OTG port is available on connector X901. This USB OTG port is required for USB boot mode.
Display Interfaces
Also see Using the hardware.
The display is connected via the 50 pin RGB interface (X509). The touch controller pins are included. With this interface customer specific displays can be connected via a convenient display adapter (bonded on the display).
The board is also equiped with an 40 pin LVDS interface (X801) and i2c bus for a touch controller. This LVDS signal is generated from the DSI output thru the SN65DSI84 DSI to LVDS converter.
There is also a HDMI output on X701. This signal is also generated from the DSI output of the STM32MP1 SOC by ADV7535 DSI to HDMI converter.
When the DSI based video signals on LVDS or HDMI shall be used, the DSI signals have to be routed
to the appropriate converter. Use gpiochip3 13
for switching the signal to the appropriate
converter. This has to be done in device tree on boot!
DSI converter select for gpiochip3 13:
DSI output select | gpiochip3 13 signal |
---|---|
LVDS converter | 0 |
HDMI converter | 1 |
Important
Only one interface (RGB or DSI) can be active at the same time.
Warning
Due to some limitations of the STM32MP1 internal DPI to DSI bridge, it is not trivial to get your LVDS or HDMI configuration to work. Sometimes it's just not possible!
There are already BSP and device tree configurations which support the HDMI/LVDS interfaces in combination with the appropriate displays out of the box. The following configurations are supported by the BSP.
HDMI
To activate HMDI on Kontron DK or BL boards, set the housing
variable in u-boot to an empty value. This selects the
stm32mp-t1000-k.dts
device tree which activates the HDMI output.
For the extlinux boot scheme you must select the stm32mp-t1000-k-nor-emmc
or stm32mp-t1000-k-sdcard
configuration in the following boot menu, too.
An approved working configuration is
- 7 inch HDMI display (see http://www.lcdwiki.com/7inch_HDMI_Display-C).
Hint
When the board boots, the HDMI monitor should be powered and plugged in. Hotplugging of monitors is not supported!
Unfortunately common HDMI display timings (standard- or established timings) are not working. The 'native' mode timings of the display has to fit! So many HDMI displays won't work - at least without further invention!
The DSI and HDMI part of linux kernel filters out some monitor modes due to some
clock frequency mismatch of the used components (LTDC, DSI brigde, HDMI bridge,
monitor). With the linux kernel configuration option
CONFIG_DRM_STM_LTDC_CLK_TOLERANCE_PERCENT
the clock frequency requirements for
filtering out available modes can be relaxed. Setting this value to 3 (3% of clock
frequency mismatch allowed) enables many monitors to display an image. Kontrons
default configuration for this value is 3
.
With CONFIG_DRM_STM_LTDC_CLK_TOLERANCE_PERCENT
enabled, all inaccurate, but
accepted configurations are printed out on the kernel console. This way it is
possible to find the best matching configuration for your hardware setup.
For example:
[ 34.023819] DSI: No exact clock configuration possible for mode "1024x600": 60 50250 1024 1068 1156 1344 600 603 609 625 0x48 0x9
[ 34.041203] DSI: Accepted (inaccurate) configuration is: target clock 50250000, real clock 50000000, delta -250 kHz
[ 34.050215] DSI: Configuration accepted due to panels 'preferred mode' flag.
[ 34.081491] LTDC: No exact clock configuration possible for mode "800x600": 60 40000 800 840 968 1056 600 601 605 628 0x40 0x5
[ 34.101210] LTDC: Accepted (inaccurate) configuration is: target clock 40000000, real clock 38461539 (-1538 kHz), deviation -3%
LVDS
To activate a supported LVDS display on Kontron DK or BL boards, set the housing
variable in u-boot to select the appropriate board variant.
There are two displays currently supported by the BSP:
Display | housing | Boot menu | Device tree | Resolution |
---|---|---|---|---|
Jenson 7 inch (BL-JT60050-01A) | -70 | stm32mp-t1000-k-70* | stm32mp-t1000-k-70.dts | 1024x600, i2c goodix multitouch |
Jenson 10 inch (BL-JT60180-01A) | -101 | stm32mp-t1000-k-101* | stm32mp-t1000-k-101.dts | 1280x800, USB multitouch |
When you want to integrate your own LVDS display you should extend the 'panel-simple' driver of the linux kernel and create an adapted device-tree file for your setup.
Set the appropriate display configuration in drivers/gpu/drm/panel/panel-simple.c
file for your display. Follow these recommendations to get a better chance to get
your display working:
- Do not set hsync-len < 3
- Try to provide a hfront-porch as big as possible
- A hfront-porch at of least 85 is required
Display backlight
Also see Using the hardware.
Display backlight is realized by Timer 4, channel 3. It is accessible thru linux
/sys/class/backlight/backlight/brightness
interface.
RTC
Also see Using the hardware.
On this board the internal RTC is used.
DMA
With the standard Kontron board configuration, there are 8 dma channels for
Linux peripheals available on dma1
. dma2
provides 8 more dma channels
for software running on M4 microcontroller.
For Linux and Kontron BL/DK boards, all 8 channels on dma1
are used with the
following configuration
channel mapping | peripheal | functionality |
---|---|---|
DMAMUX(43) to DMA0(0) | usart2 | ttySTM1, RS485 |
DMAMUX(44) to DMA0(1) | usart2 | |
DMAMUX(45) to DMA0(2) | usart3 | ttySTM2, RS232 |
DMAMUX(46) to DMA0(3) | usart3 | |
DMAMUX(36) to DMA0(4) | i2c2 | GPIO, LVDS, HDMI |
DMAMUX(35) to DMA0(5) | i2c2 | |
DMAMUX(9) to DMA0(6) | adc1 | |
DMAMUX(10) to DMA0(7) | adc2 |
For serial console (uart4), DMA is disabled, because dma1
has no more free DMA
channel. See SOM documentation for further information about
DMA peripheals, channel usage and how to modify it if you wish a differnt
configuration.
Appendix
Board Layout
Top view
Connector Pinouts
Power (X101)
RS485, CAN (X1201)
A termination for RS485 and CAN can be switched on with config switch.
- Switch 6: RS485 termination
- Switch 5: CAN termination
Termination is activated when switch is in position 'ON'
RS232 (X1202)
X1202 uses the DTE configuration (TD is output, RD is input)
Console (X202)
GPIO (X1301)
JTAG (X201)
Display DPI / RGB family (X501)
Display LVDS (X801)
FAQ
My board doesn't boot any more
If your board doesn't boot any more check these things:
- Check if 5V and 3.3V led are lighten green. If none lights up, check your power supply. If only one lights up, your board is damaged!
- Check the boot switches. If LED1 flashes fast immediately after the power is switched on, it seems, that the device is in USB downloader mode. Either the boot switches are set to USB boot or the boot device doesn't contain a valid tf-a boot loader.
- Check your serial connection (115200 baud, 8bits, no parity)
- Try to boot from a fresh written SD card with bootable content