2020-04-16 01:44 AM
Hello,
I am facing an issue with flashing my MMC on STM32MP157C-DK2 board using STM32_Programmer_CLI (linux version)
I have created a flash layout file like this:
#opt Id Name Type Device Offset Binary
- 0x01 fsbl-boot Binary none 0x0 tf-a-loader.stm32
- 0x03 ssbl-boot Binary none 0x0 u-boot-loader-optee.stm32
P 0x04 fsbl1 Binary mmc0 0x4400 tf-a.stm32
P 0x05 fsbl2 Binary mmc0 0x00044400 tf-a.stm32
P 0x06 ssbl Binary mmc0 0x00084400 u-boot.stm32
P 0x07 teeh Binary mmc0 0x00184400 tee-header_v2.stm32
P 0x08 teed Binary mmc0 0x001C4400 tee-pageable_v2.stm32
P 0x09 teex Binary mmc0 0x00204400 tee-pager_v2.stm32
P 0x10 ssbl-env Binary mmc0 0x00244400 u-boot-env.bin
P 0x11 ssbl-env-red Binary mmc0 0x00246400 u-boot-env.bin
P 0x12 fit1 Binary mmc0 0x00248400 fit_kernel_dtb.itb
P 0x13 rfs1 Binary mmc0 0x00848400 rootfs.squashfs
P 0x14 fit2 Binary mmc0 0x02048400 fit_kernel_dtb.itb
P 0x15 rfs2 Binary mmc0 0x02648400 rootfs.squashfs
After loading tf-a and u-boot and starting U-Boot in RAM, U-Boot fails to load binaries for flashing them into MMC
If I use a tsv file (with RawImage of SDcard as defined bellow), there is no issue but I don't want to choose this option because of time issue. Downloading and burning a complete image of MMC takes more time than downloading and burning individually images.
Partitions size is bigger than images size.
#opt Id Name Type Device Offset Binary
- 0x01 fsbl-boot Binary none 0x0 tf-a-loader.stm32
- 0x03 ssbl-boot Binary none 0x0 u-boot-loader-optee.stm32
P 0x32 sdcard RawImage mmc0 0x0 sdcard.img
Here are the logs of STM32_Programmer_CLI:
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 0035002E3338510B39303435
FW version : 0x0110
Device ID : 0x0500
Device name : STM32MPxxx
Device type : MPU
Device CPU : Cortex-A7
Start Embedded Flashing service
Memory Programming ...
Opening and parsing file: tf-a-loader.stm32
File : tf-a-loader.stm32
Size : 245384 Bytes
Partition ID : 0x01
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:03.103
RUNNING Program ...
PartID: :0x01
Start operation done successfully at partition 0x01
Flashlayout Programming ...
[==================================================] 100%
Running Flashlayout Partition ...
Flashlayout partition started successfully
Memory Programming ...
Opening and parsing file: u-boot-loader-optee.stm32
File : u-boot-loader-optee.stm32
Size : 810605 Bytes
Partition ID : 0x03
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:08.610
RUNNING Program ...
PartID: :0x03
reconnecting the device ...
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x0000
SN : 0035002E3338510B39303435
FW version : 0x0110
Device ID : 0x0500
Start operation done successfully at partition 0x03
Error: an error occured while uploading data from the virtual partition 0xF1
Received PhaseID == 0xFF, system is going to reboot
Here are the U-Boot Logs:
U-Boot 2018.11-stm32mp-r4 (Nov 14 2018 - 16:10:06 +0000)
CPU: STM32MP157CAC Rev.B
Model: STMicroelectronics STM32MP157C-DK2 Discovery Board
Board: stm32mp1 in op-tee mode (st,stm32mp157c-dk2)
Board: MB1272 Var2 Rev.C-01
DRAM: 480 MiB
Clocks:
- MPU : 650 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
****************************************************
* WARNING 500mA power supply detected *
* Current too low, use a 3A power supply! *
****************************************************
NAND: 0 MiB
MMC: STM32 SDMMC2: 0, STM32 SDMMC2: 1
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000
Hit any key to stop autoboot: 0
Boot over usb0!
partitions : Writing GPT: success!
done
DFU alt info setting: done
crq->brequest:0x0
crq->brequest:0x0
I don't have any information in LOGs helping me to understand what is the problem.
Does anyone know what is wrong in the first tsv file ?
Best regards,
Sebastien
2020-04-22 06:27 AM
Hi @sbg29
As a first hint could you please manage to get a proper supply voltage.
Seems you are using a weak one
****************************************************
* WARNING 500mA power supply detected *
* Current too low, use a 3A power supply! *
****************************************************
We already have cases where this lead to erratic behavior during flash operation.
Olivier