Avenger96 UMS Image Programming: Difference between revisions
From Wiki-DB
Jump to navigationJump to search
Ageisreiter (talk | contribs) |
Ageisreiter (talk | contribs) |
||
Line 5: | Line 5: | ||
== Start UMS mode in U-Boot and flash the image == | == Start UMS mode in U-Boot and flash the image == | ||
* Set Avenger96 boot mode to SPI boot. | * Set Avenger96 boot mode to SPI boot. | ||
[[Image:AV96-SPI-boot.jpg|200px|COM Avenger96Board]] | |||
* Start the board and stop in U-Boot by pressing any key. | * Start the board and stop in U-Boot by pressing any key. | ||
* Connect USB cable between USB OTG and PC host port and call the following from U-Boot command line. | * Connect USB cable between USB OTG and PC host port and call the following from U-Boot command line. |
Latest revision as of 10:51, 1 July 2022
Introduction
This guide is about how to flash the AV96 board via universal mass storage.
Start UMS mode in U-Boot and flash the image
- Set Avenger96 boot mode to SPI boot.
- Start the board and stop in U-Boot by pressing any key.
- Connect USB cable between USB OTG and PC host port and call the following from U-Boot command line.
ums 0 mmc 1
-> Mass storage is detected from the host PC.
- Now you can use balena etcher to flash the dh-image-demo to eMMC.
Update U-Boot from USB stick
After the image update you will have the problem, that the originally flashed U-Boot is not capable to load the new Image. To fix this you have to update the U-Boot on the SPI flash:
- Copy the U-Boot and SPL binaiers to a USB stick and plugin the flash drive at the AVenger96 Host port
- Start U-Boot and set the following ENV variable:
env set update_sf 'usb start && env set loadaddr 0xc2000000 && env set loadaddr1 0xd2000000 && load usb 0 ${loadaddr1} u-boot-spl.stm32 && env set filesize1 ${filesize} && load usb 0 ${loadaddr} u-boot.itb && sf probe && sf erase 0 0x200000 && sf update ${loadaddr1} 0 ${filesize1} && sf update ${loadaddr1} 0x40000 ${filesize1} && sf update ${loadaddr} 0x80000 ${filesize} && env set filesize1 && env set loadaddr1'
- Run the script
run update_sf
Note: Output from "update_sf"
STM32MP> run update_sf starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 3 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found 123312 bytes read in 24 ms (4.9 MiB/s) 635832 bytes read in 42 ms (14.4 MiB/s) SF: Detected w25q16dw with page size 256 Bytes, erase size 64 KiB, total 2 MiB SF: 2097152 bytes @ 0x0 Erased: OK device 0 offset 0x0, size 0x1e1b0 123312 bytes written, 0 bytes skipped in 2.597s, speed 48584 B/s device 0 offset 0x40000, size 0x1e1b0 123312 bytes written, 0 bytes skipped in 2.641s, speed 47775 B/s device 0 offset 0x80000, size 0x9b3b8 635832 bytes written, 0 bytes skipped in 13.123s, speed 49607 B/s STM32MP>
- Restart the board -> New U-Boot will start up and will load the flashed dh-image-demo