DHSBC STM32MP2 DFU and UMS usage
From Wiki-DB
Jump to navigationJump to search
Requirements
Software
- Linux host computer (Virtual Machine for Application Development is used in this guide)
- dfu-util (for DFU boot mode)
Hardware
- DHSBC STM32MP25 board
- USB-A to Type-C cable (for DFU and UMS data connection)
- Type-C power supply for DHCBS STM32MP25 board
- FTDI cable TTL-232R-3V3 for console connection
Preparation
This installation was made on the Virtual Machine for Application Development. All console expressions refer to this Debian system, but any other debian based system should also work.
BOOT MODES
USB (DFU) 0000b eMMC Flash 0010b
Install dfu-util (debian)
sudo apt-get install dfu-util
sudo apt-get install bmap-toolsCollect artifacts from OE build:
- tf-a-stm32mp25xx-dhcos-som.stm32-stm32mp2
- fip-ddr.bin-stm32mp2
- fip.bin-stm32mp2
- dh-image-demo-dh-stm32mp25-dhcos-dhsbc.rootfs.wic.bmap dh-image-demo-dh-stm32mp25-dhcos-dhsbc.rootfs.wic
Start U-Boot via USB DFU upload:
- >>> Connecting USB Data and FTDI console port. Open a terminal program (PuTTY or TeraTerm) for serial console connection.
- >>> Switch boot mode to 1234=OFF-OFF-OFF-OFF (USB DFU boot)
- >>> Power on the board
- >>> DFU device apears on Linux host computer
$ dfu-util -w -a 0 -D tf-a-stm32mp25xx-dhcos-som.stm32-stm32mp2 -R
$ dfu-util -w -a 0 -D fip-ddr.bin-stm32mp2 -R
$ dfu-util -w -a 1 -D fip.bin-stm32mp2 -R- >>> U-Boot starts up. Stop in U-Boot for next step
Install bootloader to eMMC:
- U-Boot side:
=> ums 0 mmc 1.1- Host PC side
$ sudo dd if=tf-a-stm32mp25xx-dhcos-som.stm32-stm32mp2 of=/dev/sdX- U-Boot side:
=> ums 0 mmc 1.2- Host PC side
$ sudo dd if=tf-a-stm32mp25xx-dhcos-som.stm32-stm32mp2 of=/dev/sdX- U-Boot side:
=> mmc partconf 1 1 1 0Install root filesystem to eMMC:
- U-Boot side:
=> ums 0 mmc 1- Host PC side
$ sudo bmaptool copy --bmap dh-image-demo-dh-stm32mp25-dhcos-dhsbc.rootfs.wic.bmap dh-image-demo-dh-stm32mp25-dhcos-dhsbc.rootfs.wic /dev/sdX- >>> Power off the board, switch boot mode to 1234=OFF-ON-OFF-OFF (eMMC boot)
- >>> Power on and boot