cancel
Showing results for 
Search instead for 
Did you mean: 

No boot after flashing the STM32MP157f-dk2 SD card

anpa
Associate II

Hi all,


I just got the board and off course now want to follow the official page (https://wiki.stmicroelectronics.cn/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP135x-DK/Let%27s_start/Populate_the_target_and_boot_the_image) for flashing.

OS windows 10.

STMCubeProgrammer v2.18.0

  1. inserted SD card to board, SW1 set to USB, connected PC with CN7
  2. started the STMCubeProgrammer and successfully connected to USB1 (so drivers OK)
  3. downloaded en.FLASH-stm32mp1-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06.tar.gz and unpacked
  4. run in cmd: C:\Program Files(x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>STM32_Programmer_CLI.exe -c port=usb1 -w C:\<path>\FlashLayout_sdcard_stm32mp157f-dk2-optee.tsv
  5. see result Download.png (as I never saw a correct log I think here something went wrong after "Reconnecting the device ...")
  6. on display: "DFU alt info setting: done"
    "crq->brequest: 0x0"
  7. power off, SW1 set to SD card (position oppostite from USB), power ON
  8. nothing on display and on uart

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
anpa
Associate II

HI PatrickF,

 

Good news, I found a way to download.

  • I run again start "STM32 USB DFU DRIVER" pnputil -i -a %0\..\Driver\STM32Bootloader.inf but without connected USB and I got a message success (but not sure was this step actual needed).
  • Open CubeProgrammer.
  • So first attempt is like I described and crashes the programmer The usb state is Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000.
  • Than without resetting the board I reopen the programmer connect the board but than it is reported Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x2001, @Name /STM32MP157FAC Rev.Z so I thought it will work, but crashes again.
  • Luckily the 3 attempt works until the end and downloads ALL (important dont reset the board leave the state from 2nd attempt)

 

anpa_0-1734862733335.png

Attached the uart log with all 3 attempts.

This issue is resolved!!!!

Regards & thx for support,

anpa

 

 

View solution in original post

11 REPLIES 11
PatrickF
ST Employee

Hi,

this is two  common pitfalls which could make this to happen:

  1. Supply is detected as non-compliant with Type-C power supply. Red led bright and there is message on the board console log (STLINK USB Virtual Com Port).
  2. When using Linux over a Virtual Machine, when downloaded uBoot starts, the USB port newly enumerated should be defined to connect automatically to the virtual machine (as usually by default connected to Windows OS).

Regards,

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi PatrickF,

 

I use official Raspi 4 (ouput 5.1V 3A 15.3W) charger which should be ok for the board. 

I use windows 10 pure and no VM or wsl2. I dont see any error anywhere.

I suspect 3 things.

  • Something wrong with usb port on board but than it partially downloaded  as seen on the picture I attached.
  • I suspect some bug in the Cube programmer as it basically crashes after message "reconnecting devices"
  • some problem with the usb on my laptop (but I doubt this)

I flashed so far the booloader with balenaEtcher to the SDCard and this is ok I reach the u-boot.

I also did this https://bootlin.com/blog/building-a-linux-system-for-the-stm32mp1-basic-system/ and works perfectly.

So my problem is CubeProgrammer is not transferring files to the SDCard. Strange thing is why the programmer crashes and not displaying some error code? Should I try some older versions and/or install a VM and flash it from linux?

Regards,

Andor

 

Hi,

Power supply could be 5V 3A and NOT USB Type-C compliant (there is many on the market). RPi does not check this compliance as our OpenSTLinux Starter Package do (it could be disabled when you will rebuild a now image for this board or a custom board).

 

Could you share the board console log by connecting STLINK connector to a PC and running a terminal emulator on the related Virtual Com Port?

 

Btw, the link you provided in your first post is not for the right product/board (but should not make difference as in the screen capture, I see right files)

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Let%27s_start/Populate_the_target_and_boot_the_image

 

Regards.

 

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi PatrickF,

 

Here is the DFU_log.txt, thx for looking into it.

I am still wondering why the programmer closes itself and not to pop up some error? This can also be a a combination of bug in the programmer and error on the board which crashes the tool.

 

Regards.

 

anpa
Associate II

also attaching 2 pictures to see the LEDs, during download and after the Cubeprogrammer closes (crashes)

ok, so maybe a missing USB driver on the PC (I guess during CubeProg install).
Could you look at Windows Device Manager (after the 'reconnect') to see if 'reconnected' DFU is present.like this

PatrickF_0-1734425817623.png

 

Regards,

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

hm yes it doesn't look that fancy

anpa_0-1734433438724.png

but I ran from shell STM32Bootloader.bat I even commented the @Echo off to check which if else enters the bash script

anpa
Associate II

Hi PatricF,

I tried to reinstall all again but no luck.

I debugged the STM32Bootloader.bat and from if else it enters the:

start "STM32 USB DFU DRIVER" pnputil -i -a %0\..\Driver\STM32Bootloader.inf

but the log I get:

 

pnputil -i -a "c:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\Drivers\DFU_Driver\Driver\STM32Bootloader.inf"
Microsoft PnP Utility

Processing inf : STM32Bootloader.inf
Failed to install the driver : No more data is available.


Total attempted: 1
Number successfully imported: 0

 

regards

Hi @anpa 

strange as CubeProgramer should have been installed in C:\Program Files and not c:\Program Files (x86)

What result did you get if you right click on STM32Bootloader.inf file then select install ?

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.