Skip to main content
Graduate II
October 4, 2023
Solved

How do I open a uboot shell?

  • October 4, 2023
  • 3 replies
  • 8393 views

I know this is probably a really stupid/noob question but I was trying to flash the STM32MP157D-DK1 board I have for the first time following the following guide:

https://wiki.st.com/stm32mpu/wiki/STM32MP15_Discovery_kits_-_Starter_Package 

I ran into an issue where it started the flash and then couldn't reconnect.  I did find this article that seems to describe exactly the issue I'm having:

https://community.st.com/t5/stm32-mpus/faq-stm32mp1-stm32cubeprogrammer-usb-reconnect-error-at-stm32mp1/ta-p/49263 

It recommends:

 

In Uboot shell run a Dfu command :

 STM32MP> env set dfu_alt_info "DDR ram 0xC0000000 0x20000000"

 STM32MP> dfu 0 ram 0

 

 Unfortunately, I don't know how to run a uboot shell to try this.  I know this is probably a really stupid problem . . . but I'm also hoping that means it has an easy solution as well.  Any help you can give me would be greatly appreciated.  Thanks!

    This topic has been closed for replies.
    Best answer by PatrickF

    Hi @JayDev ,

    Did you tried another USB port on your PC, thru an USB hub ? With another PC, another USB cable ?

    Maybe details your PC setup (W10 ? W11 ? USB-A or USB-C port ? ...)

    Regards.

    3 replies

    JayDevAuthor
    Graduate II
    October 5, 2023

    I do have a ST-Link to the board and I'm watching the serial port @ 115200 and can see info coming in, I just don't know how to actually get to the u-boot to change the command.  Maybe I'm getting closer but I'm not 100% sure.  Thanks!

    Technical Moderator
    October 5, 2023

    Hi @JayDev 

    to reach uboot prompt, simply press a key on the serial console at right time during boot sequence.

    .....
    U-Boot 2022.10-stm32mp-r1 (Oct 03 2022 - 19:25:32 +0000)
    
    CPU: STM32MP157FAC Rev.Z
    Model: STMicroelectronics STM32MP157F-DK2 Discovery Board
    Board: stm32mp1 in trusted mode (st,stm32mp157f-dk2)
    Board: MB1272 Var4.0 Rev.C-02
    DRAM: 512 MiB
    optee optee: OP-TEE: revision 3.19 (afacf356)
    Clocks:
    - MPU : 800 MHz
    - MCU : 208.878 MHz
    - AXI : 266.500 MHz
    - PER : 24 MHz
    - DDR : 533 MHz
    Core: 367 devices, 43 uclasses, devicetree: board
    WDT: Started watchdog with servicing (32s timeout)
    NAND: 0 MiB
    MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
    Loading Environment from MMC... OK
    In: serial
    Out: serial
    Err: serial
    Net: eth0: ethernet@5800a000
    Hit any key to stop autoboot: 0
    STM32MP>

    Regards.

    JayDevAuthor
    Graduate II
    October 9, 2023

    So, I've been trying to get this to work but still haven't seen the boot.  I've tried plugging in the USB power and USB Micro/STLink and clicking the reset button but get no output.  I've tried leaving STLink plugged in and resetting (both end up with LD6 blinking red on and off.  I can plug in the other USB-C connector and the light goes solid.  Still no output, even when resetting. 

    The only time I can get an actual output is when trying to program the device over USB in STM32Prog.  This is the output screen I'm getting:

    INFO: Receive DFU Detach
    INFO: DFU USB STOP...
    INFO: BL2: Loading image id 1
    INFO: Loading image id=1 at address 0x2ffff000
    INFO: Image id=1 loaded: 0x2ffff000 - 0x2ffff1ea
    INFO: FCONF: Reading FW_CONFIG firmware configuration file from: 0x2ffff000
    INFO: FCONF: Reading firmware configuration information for: dyn_cfg
    INFO: FCONF: Reading firmware configuration information for: stm32mp1_firewall
    INFO: BL2: Loading image id 4
    INFO: Loading image id=4 at address 0xde000000
    INFO: Image id=4 loaded: 0xde000000 - 0xde00001c
    INFO: OPTEE ep=0xde000000
    INFO: OPTEE header info:
    INFO: magic=0x4554504f
    INFO: version=0x2
    INFO: arch=0x0
    INFO: flags=0x0
    INFO: nb_images=0x1
    INFO: BL2: Loading image id 8
    INFO: Loading image id=8 at address 0xde000000
    INFO: Image id=8 loaded: 0xde000000 - 0xde036b68
    INFO: BL2: Skip loading image id 9
    INFO: BL2: Loading image id 2
    INFO: Loading image id=2 at address 0xc0500000
    INFO: Image id=2 loaded: 0xc0500000 - 0xc051ee40
    INFO: BL2: Skip loading image id 16
    INFO: BL2: Loading image id 5
    INFO: Loading image id=5 at address 0xc0100000
    INFO: Image id=5 loaded: 0xc0100000 - 0xc01f5d3c
    NOTICE: BL2: Booting BL32
    INFO: Entry point address = 0xde000000
    INFO: SPSR = 0x1d3
    I/TC: Early console on UART#4
    I/TC: 
    I/TC: Embedded DTB found
    I/TC: OP-TEE version: 3.19.0-dev (gcc version 12.2.0 (GCC)) #1 Fri Oct 14 19:00:05 UTC 2022 arm
    I/TC: WARNING: This OP-TEE configuration might be insecure!
    I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
    I/TC: Primary CPU initializing
    I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp157d-dk1.dts
    I/TC: DTB enables console (non-secure)
    I/TC: Primary CPU switching to normal world boot
    optee optee: OP-TEE: revision 3.19 (afacf356)
    
    
    U-Boot 2022.10-stm32mp-r1 (Oct 03 2022 - 19:25:32 +0000)
    
    CPU: STM32MP157DAC Rev.Z
    Model: STMicroelectronics STM32MP157D-DK1 Discovery Board
    Board: stm32mp1 in trusted mode (st,stm32mp157d-dk1)
    Board: MB1272 Var3.0 Rev.C-02
    DRAM: 512 MiB
    optee optee: OP-TEE: revision 3.19 (afacf356)
    Clocks:
    - MPU : 800 MHz
    - MCU : 208.878 MHz
    - AXI : 266.500 MHz
    - PER : 24 MHz
    - DDR : 533 MHz
    Core: 359 devices, 39 uclasses, devicetree: board
    WDT: Started watchdog with servicing (32s timeout)
    NAND: 0 MiB
    MMC: STM32 SD/MMC: 0
    Loading Environment from nowhere... OK
    In: serial
    Out: serial
    Err: serial
    Previous ADC measurements was not the one expected, retry in 20ms
    ****************************************************
    * ERROR USB TYPE-C connection in unattached mode *
    * Check that USB TYPE-C cable is correctly plugged *
    * Current too low, use a 3A power supply! *
    ****************************************************

    All signs appear to be pointing to the power supply, but that doesn't make sense to me as I'm currently using a 5V 3A supply (I'm using https://www.mouser.com/ProductDetail/TT-Electronics-IoT-Solutions/T7715DV?qs=vLWxofP3U2zWk%2FI5z4EHKA%3D%3D ).  Is it possible the issue really is the power supply?  Maybe it's dipping and browning out?  Or is my current process for getting to uboot incorrect?

    Thanks for your help and sorry for the delay!  I should be faster to respond this week!

    JayDevAuthor
    Graduate II
    October 16, 2023

    @Olivier GALLIEN 

    @PatrickF 

    Any other ideas on where to proceed from here?  I'm running out of ideas, unfortunately.  Anything else I can try to get more information? 

    PatrickFAnswer
    Technical Moderator
    October 17, 2023

    Hi @JayDev ,

    Did you tried another USB port on your PC, thru an USB hub ? With another PC, another USB cable ?

    Maybe details your PC setup (W10 ? W11 ? USB-A or USB-C port ? ...)

    Regards.

    JayDevAuthor
    Graduate II
    October 19, 2023

    @PatrickF 

    I had tried using STM32CubeProb and the command line from a dedicated Linux Laptop (6 Core Intel Processor with 32 GB of RAM, more than enough to run this), and had the USB going into a Vantec powered hub, so I thought that was fine.  I changed out the USB cables and went directly into a Windows machine and was able to get it working.  Not sure what the limiting factor was since I changed everything at once (probably not one of my smartest moves, but it seems to have worked).  I'll have to poke at it to find the limiting factor.  Not sure if the issue was the USB cables or the hub (it's limited to 900 mA of current, which is the USB 3.0 standard, I guess.  Not sure if the port on a laptop would be providing more).  

    Anyway, thanks for helping me resolve this!