Skip to main content
Graduate II
March 29, 2021
Question

Issue burning starter demo to STM32MPU1D-DK1

  • March 29, 2021
  • 1 reply
  • 1781 views

Hello everyone!

I'm getting familiar with the STM32MP1 tools on a linux laptop and I'm trying to burn the demo to my STM32MP1D-DK1 board. I know most the demos are aimed at the DK2 but it's sold out everywhere and I don't currently need wifi or bluetooth (or an LCD), so this seemed good enough for me.

Anyway, I'm trying to follow the instructions on the STM32MP1 wiki page (

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Let%27s_start/Populate_the_target_and_boot_the_image) and I'm running into an issue when trying to burn the firmware:

0693W000008yDwZQAU.jpgUnfortunately, I get the errors above, a red LED (LD5?) starts flashing on and off, a blue LED (LD6?) stays on, and LD4 continues to toggle on and off about every second or so (this was the same prior to burning the firmware as well.

I tried to follow a similar tutorial to burn via a command line (https://wiki.st.com/stm32mpu/wiki/STM32MP15_Discovery_kits_-_Starter_Package#Preparing_the_USB_serial_link_for_flashing) and had a similar issue. Here's what I'm getting:

~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0/Starter-Package/stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images/stm32mp1$ STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157d-dk1-trusted.tsv
 -------------------------------------------------------------------
 STM32CubeProgrammer v2.7.0 
 -------------------------------------------------------------------
 
 
 
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 003400163438511536383238
FW version : 0x0110
Device ID : 0x0500
Device name : STM32MP1
Device type : MPU
Device CPU : Cortex-A7
 
 
Start Embedded Flashing service
 
 
 
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157d-dk1-serialboot.stm32
 File : tf-a-stm32mp157d-dk1-serialboot.stm32
 Size : 237896 Bytes
 Partition ID : 0x01 
 
Download in Progress:
[==================================================] 100% 
 
File download complete
Time elapsed during download operation: 00:00:00.569
 
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-stm32mp157d-dk1-trusted.stm32
 File : u-boot-stm32mp157d-dk1-trusted.stm32
 Size : 903062 Bytes
 Partition ID : 0x03 
 
Download in Progress:
[==================================================] 100% 
 
File download complete
Time elapsed during download operation: 00:00:00.936
 
RUNNING Program ... 
 PartID: :0x03 
 
Reconnecting the device ...
 
Error: 
Unable to reconnect the target device: time out expired
 
 
Error: Start operation failed at partition 0x03

The errors look similar, which makes sense (whatever is an issue with one is likely the issue with another).

A few notes, I do have both boot switches turned to off for burning FW, my power supply is rated at 3A, I have the ST-Link USB cable connected, as well as the power supply (5V 3A), and the USB C (USB OTG, just going into a port on my laptop, not a powered hub).

Any idea what might be causing the issue? Is it possible there's an issue with the DK1 files or am I doing something wrong?

Any help you can give me would be appreciated. Thanks!

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    March 30, 2021

    Hi,

    please have a look to https://community.st.com/s/article/FAQ-STM32MP1-STM32CubeProgrammer-USB-reconnect-error-at-STM32MP1-boot-device-flashing

    As you did not rebuilt the binaries, I think it is a Virtual Machine USB setting issue.

    Regards.

    JayDevAuthor
    Graduate II
    April 8, 2021

    I apologize for the delay, I got pulled away on another project! Finally getting a chance to circle back!

    Thank you so much for that link, it definitely sounds like that is my issue. I was going through the guide and got stuck at the following location:

    If you are usining native Linux PC check you "see" Uboot configured as a USB peripheral
     
    In Uboot shell run a Dfu command :
     STM32MP> env set dfu_alt_info "DDR ram 0xC0000000 0x20000000"
     STM32MP> dfu 0 ram 0

    I am in native linux but I'm not sure if I understand how to run a uboot script. Maybe this is a basic task but I'm somewhat new to Linux so I'm not sure if this is a file I need to edit or if this is just from terminal. I tried navigating to the ~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0/Starter-Package/stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images/stm32mp1 directory and trying to launch the command but I'm getting the following:

    env: ‘set’: No such file or directory 

    I'm likely doing something wrong there. However, I did run dmesg and seem to have confirmed the issue is there as I'm getting this:

    [ 1273.375554] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 1273.375555] usb 1-5: Product: DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
    [ 1273.375557] usb 1-5: Manufacturer: STMicroelectronics
    [ 1273.375558] usb 1-5: SerialNumber: 003400163438511536383238
    [ 1831.982439] usb 1-5: USB disconnect, device number 8

    Based on this, it does appear that it's in HS mode rather than getting:

    [17802.822239] usb 5-1.3.1.2: new high-speed USB device number 10 using xhci_hcd
    [17802.922995] usb 5-1.3.1.2: New USB device found, idVendor=0483, idProduct=df11
    [17802.922998] usb 5-1.3.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [17802.923001] usb 5-1.3.1.2: Product: USB download gadget
    [17802.923003] usb 5-1.3.1.2: Manufacturer: STMicroelectronics
    [17802.923004] usb 5-1.3.1.2: SerialNumber: 003A00203438510D36383238

    Looks like my product is wrong, which makes sense, based on the article provided.

    I was reading through the article though and I don't really understand what it is I need to do from here to resolve the issue. Can you provide some additional support? I'm not really sure what to do next.

    Let me know if there's anything I can try to get this up and working. Hoping to be able to at least burn firmware to this chip soon so I can dive in! Thanks for all your help and sorry again for the delay!

    Technical Moderator
    April 8, 2021

    First, could you try using command line to flash and add "-tm 10000" on the command (increase default timeout to 10 seconds) ?

    I agree the FAQ is not crystal clear.

    You need to stop load sequence at uBoot console, by enabling only the two first items in CubeProgrammer.

    Then, using the serial console (Virtual Com Port of the ST-Link, 115200,n,8,1, see 'The serial terminal'), with CTRL+C you should get the uBoot "STM32MP>" prompt.

    Then you could try the requested commands which should make an USB device visible on your PC (this is just for checking purposes).

    If not visible, it is a PC setup issue.

    Note that the 'DFU in HS Mode' you see is normal and it is the first USB connection from BootROM used to load TF-A and uBoot in RAM.

    Then uBoot start and reconnect using a different USB connection 'USB download gadget' (this occur in the log after "Reconnecting the device ..." which is failing on your PC).

    Regards.