Skip to main content
Visitor II
March 11, 2024
Solved

ST bootloader - pin states

  • March 11, 2024
  • 2 replies
  • 1434 views

Hi,

I'm currently gaining experience with the STM32G4, whose ROM bootloader supports various interfaces. AN2606 describes the configuration of the pins occupied by the interfaces.
Various pins are operated in push-pull mode, which can lead to undesirable effects in an external circuit.
My question is whether it is possible to deactivate unneeded interfaces in the bootloader, e.g. via option bytes, or whether this can only be achieved with a separate bootloader.

Thanks in advance for your feedback!

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

    > My question is whether it is possible to deactivate unneeded interfaces in the bootloader, e.g. via option bytes, or whether this can only be achieved with a separate bootloader.

    No, it is not possible to change the behavior of the bootloader in any way. You cannot disable interfaces selectively.

    However, most pins are in input mode and it is only a problem if they are being toggled externally, which could be misinterpreted as activity on that bus.

    2 replies

    Graduate
    March 11, 2024

    Sure, there is a special option bit for it called nSWBOOT0

    AlexSmart_0-1710144916777.png

     

    kf_SEAAuthor
    Visitor II
    March 11, 2024

    Hi @AlexSmart 

    thanks, but the question not about the pins or option bytes to enter the bootloader but about the interfaces supported by the bootloader for communication (USART, SPI, IC2). For all of them the bootloader configures GPIOs (AN2606) which can conflict with the external circuit. I'm interested if some of these interfaces can be disabled for the bootloader.

    kr

    TDKAnswer
    Super User
    March 11, 2024

    > My question is whether it is possible to deactivate unneeded interfaces in the bootloader, e.g. via option bytes, or whether this can only be achieved with a separate bootloader.

    No, it is not possible to change the behavior of the bootloader in any way. You cannot disable interfaces selectively.

    However, most pins are in input mode and it is only a problem if they are being toggled externally, which could be misinterpreted as activity on that bus.