Skip to main content
Graduate
July 10, 2024
Solved

Using Internal Bootloader on STM32G0 Microcontroller Without Exposed Pins

  • July 10, 2024
  • 4 replies
  • 2270 views

Hello everyone,

I am working with the STM32G0B1KEU6 microcontroller, which comes in a 32-pin package featuring only ports A, B, and C. According to AN2606, the internal bootloader uses the following pins:

  • FDCAN1_Rx pin: Input PD0, used in alternate push-pull, pull-up mode.
  • FDCAN1_Tx pin: Output PD1, used in alternate push-pull, pull-up mode.

Given that these specific pins (PD0 and PD1) are not available on my microcontroller, I am curious to know:

  1. Can the internal bootloader still be utilized without these pins?
  2. Are there alternative pins that can be used for the bootloader functionality on this microcontroller?
  3. If the above options are not feasible, does this mean that the bootloader feature is not available for the STM32G0B1KEU6?

Any insights or experiences with similar configurations would be greatly appreciated. Thank you!

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

    @EniRot99 wrote:

     

    Given that these specific pins (PD0 and PD1) are not available on my microcontroller, I am curious to know:

    Are you sure about this? The DS indicates there are two 32-pin variants, and one of them does have PD0/PD1.

    FDCAN.jpg

    And from the ST direct store:

    chip_N.jpg

    and from CubeMX:

    CUBE_N.jpg

     

     

    4 replies

    Super User
    July 10, 2024

    > Can the internal bootloader still be utilized without these pins?

    No. Only pins and peripherals listed in AN2606 can be used.

    > Are there alternative pins that can be used for the bootloader functionality on this microcontroller?

    No

    > If the above options are not feasible, does this mean that the bootloader feature is not available for the STM32G0B1KEU6?

    Correct.

    EniRot99Author
    Graduate
    July 11, 2024

    Thank you for the information. This is exactly what I needed to know.

    In this case, I will need to look for another microcontroller, as the other side of the system is already set up to connect to the bootloader via CAN.

    Rewriting an existing bootloader is not a practical option for me.

    Graduate II
    July 10, 2024

    Of course the bootloader feature itself is available - just not over FDCAN (but can work over UART for example).

     

    Your chip does seem to have FDCAN2. Possibly, you could use a custom bootloader to achieve what you want.

    How to use the ST Open Bootloader for STM32 Microcontrollers 

     

    (This is strange. If ST knows it prunes FDCAN1 on some packages, why would they write the boot loader to use FDCAN1 instead of FDCAN2?) (*)

     

     

     (*) Update: as TDK said, FDCAN1 does exist on the chip, but only a different pair of pins are available for the FDCAN RX/TX signals.

    Super User
    July 10, 2024

    > This is strange. If ST knows it prunes FDCAN1 on some packages, why would they write the boot loader to use FDCAN1 instead of FDCAN2?

    This chip still has FDCAN1 and pins that can use it, just not the pins that the bootloader uses. There are thousands of chips and much fewer bootloader versions, it's not going to be possible to micromanage every case.

    EniRot99Author
    Graduate
    July 11, 2024

    I need to correct my initial response. I will be writing my own bootloader, as there is no similar chip available in the package I am using. The L4, G0, G4, U5, and H5 series all have a similar bootloader, but the necessary pins are not exposed in the package I want to use.

     

    Additionally, these chips quickly become too expensive and have much more peripheral functionality than I need.

    Thanks again for your help!

    BarryWhitAnswer
    Graduate II
    July 11, 2024

    @EniRot99 wrote:

     

    Given that these specific pins (PD0 and PD1) are not available on my microcontroller, I am curious to know:

    Are you sure about this? The DS indicates there are two 32-pin variants, and one of them does have PD0/PD1.

    FDCAN.jpg

    And from the ST direct store:

    chip_N.jpg

    and from CubeMX:

    CUBE_N.jpg