Skip to main content
Visitor II
February 18, 2022
Question

STM32U575/585, how to enter ROM bootloader to flash SW at very first time.

  • February 18, 2022
  • 4 replies
  • 4193 views

First I was reading:

Reference manual

STM32U575/585 Arm®-based 32-bit MCUs

4 Boot modes

ST programmed

default value

NSBOOTADD0[24:0]

Flash: 0x0800 0000

NSBOOTADD1[24:0]

Bootloader:

0x0BF9 0000

Then:

AN2606

Application note

STM32 microcontroller system memory boot mode

The STM32U575xx/85xx bootloader is activated by applying pattern12

TZen = 0, Boot0(pin) = 0, nSWBoot0(bit) = 1 and NSBOOTADD0 [24:0] = 0x017F200

TZen = 0, Boot0(pin) = 1, nSWBoot0(bit) = 1 and NSBOOTADD1 [24:0] = 0x017F200

TZen = 0, nBoot0(bit) = 0, nSWBoot0(bit) = 0 and NSBOOTADD1 [24:0] = 0x017F200

TZen = 0, nBoot0(bit) = 1, nSWBoot0(bit) = 0 and NSBOOTADD0 [24:0] = 0x017F200

But what are default values for nBoot0 and nSWBoot0 ?

I'am trying to understand how to enter ROM bootloader at very first boot.

    This topic has been closed for replies.

    4 replies

    Graduate II
    February 18, 2022

    Patterns is for next boots and options mangle, im not expert for U5 , but seems is configured to start system loader if empty on 0x08...

    You can connect one supported interface from AN2606 and try use it.

    Super User
    February 18, 2022

    Other families have the default bytes listed in the reference manual, but it seems the STM32U5 does not. Definitely a deficiency in the documentation unless I'm missing it. You could use STM32CubeProgrammer to read the values from a fresh chip to obtain that info.

    To me, it doesn't look like the chip will launch the bootloader if flash is empty. Where are you finding that @MM..1​ ?

    Getting into the bootloader for the very first time is probably going to require some hardware connection. SWD programming mode will work just fine, but if you want to program over a bootloader interface, probably will need to pull BOOT0 high. You could even fabricate the chip with it held high and modify option bytes during programming to ignore that bit. Other families are configured such that BOOT0 pin is active as a default, I would expect the STM32U5 is the same but can't confirm.

    Graduate II
    February 18, 2022

    ST programmed

    default value

    NSBOOTADD0[24:0]

    Flash: 0x0800 0000

    NSBOOTADD1[24:0]

    Bootloader:

    0x0BF9 0000

    Super User
    February 18, 2022

    Yes, but that says nothing about whether or not a factory fresh chip will enter the bootloader.

    nSWBoot0/nBoot0 are the relevant bits here, plus the address.

    Technical Moderator
    February 24, 2022

    >> Other families have the default bytes listed in the reference manual, but it seems the STM32U5 does >> not. Definitely a deficiency in the documentation unless I'm missing it.

    Default bytes are the values of fab. Once FLASH_OPTR is programmed, default values are lost and changed with ones programmed by user.

    After boot we will read the new values loaded from flash memory at OBL. Based on this description new values are unknown/changeable during the device life cycle. That's why in the U5 reference manual there is 0xxxx_xxxxx as reset value for the FLASH_OPTR and for some other register of the FlashIF.

    The situation is the same for other families also, but in RM we find just production default values that will be changed with user ones (unknown values: 0xxxx_xxxx).

    Super User
    February 24, 2022
    The problem is that the default value is not listed anywhere. It is well understood that the values can be changed by the user, but the user should know what values are programmed at the factory. That information is missing.
    Technical Moderator
    February 24, 2022

    I confirm this information is missing. I think it was intentionally kept missing. I let you know if I know the reason.

    As described above, values from a fresh chip can be read using STM32CubeProgrammer.

    Graduate II
    March 17, 2022

    Most likely it was forgotten to update that value after the actual value to use was decided, when the chip was released. As explained above, the default (factory) value should be put in the reference manual as it is done for other series.

    @Imen DAHMEN​, maybe you can fix/report this...

    Technical Moderator
    March 17, 2022

    Hello @Piranha​ ,

    Thank you for flagging this for me!

    I raised this request internally for fix.

    Thanks

    Imen