Skip to main content
Visitor II
April 11, 2023
Solved

STM32G041 boot mode selection

  • April 11, 2023
  • 2 replies
  • 3305 views

Hello All,

We are using STM32G041F8P6 in our project. This IC will be programmed through I2C/USART and we will be using System Memory for booting(internal flash).

As per the datasheet:

At startup, the boot pin and boot selector option bit are used to select one of the three boot

options:

• boot from User Flash memory

• boot from System memory

• boot from embedded SRAM

Can you please let me know where I can find the info about Boot0 pin and Boot bit setting to boot from internal flash memory?

Thank you

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

    Hello @sagar_bn​ ,

    Yes indeed on STM32G0x1 devices there are three different boot mode which can be selected through the BOOT0 pin (PA14) and the boot configuration bits nBOOT1, BOOT_SEL and nBOOT0in the User option byte.

    Here is the different configurations, you can find them in the Reference Manual (attached) "section 2.5 Boot configuration"


    _legacyfs_online_stmicro_images_0693W00000bhqrpQAA.png
    _legacyfs_online_stmicro_images_0693W00000bhqs4QAA.png 

    In summary, if you want to boot from the internal flash, you can :

    • if you use Boot0 pin (PA14) : put BOOT0 pin (PA14) and the bits BOOIT_LOCK, nBOOT_SEL at 0
    • if you use the Boot bit : put nBOOT_SEL and nBOOT0 bits to 1

    Best Regards,

    A.MVE

    2 replies

    AimeAnswer
    ST Employee
    April 11, 2023

    Hello @sagar_bn​ ,

    Yes indeed on STM32G0x1 devices there are three different boot mode which can be selected through the BOOT0 pin (PA14) and the boot configuration bits nBOOT1, BOOT_SEL and nBOOT0in the User option byte.

    Here is the different configurations, you can find them in the Reference Manual (attached) "section 2.5 Boot configuration"


    _legacyfs_online_stmicro_images_0693W00000bhqrpQAA.png
    _legacyfs_online_stmicro_images_0693W00000bhqs4QAA.png 

    In summary, if you want to boot from the internal flash, you can :

    • if you use Boot0 pin (PA14) : put BOOT0 pin (PA14) and the bits BOOIT_LOCK, nBOOT_SEL at 0
    • if you use the Boot bit : put nBOOT_SEL and nBOOT0 bits to 1

    Best Regards,

    A.MVE

    ST Employee
    April 13, 2023

    Hi @sagar_bn​ ,

    Do you need any additional support on this topic?

    Please let me know ;)

    BR

    A.MVE

    sagar_bnAuthor
    Visitor II
    April 13, 2023

    HI @Aime​ 

    Thank you for the support.