cancel
Showing results for 
Search instead for 
Did you mean: 

Using Internal Bootloader on STM32G0 Microcontroller Without Exposed Pins

EniRot99
Associate II

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!

1 ACCEPTED SOLUTION

Accepted Solutions
BarryWhit
Senior III

@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

 

 

- If a post has answered your question, please acknowledge the help you received by clicking "Accept as Solution".
- Once you've solved your issue, please consider posting a summary of any additional details you've learned. Your new knowledge may help others in the future.

View solution in original post

6 REPLIES 6
TDK
Guru

> 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.

If you feel a post has answered your question, please click "Accept as Solution".
BarryWhit
Senior III

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.

- If a post has answered your question, please acknowledge the help you received by clicking "Accept as Solution".
- Once you've solved your issue, please consider posting a summary of any additional details you've learned. Your new knowledge may help others in the future.

> 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.

If you feel a post has answered your question, please click "Accept as Solution".

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.

EniRot99
Associate II

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!

BarryWhit
Senior III

@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

 

 

- If a post has answered your question, please acknowledge the help you received by clicking "Accept as Solution".
- Once you've solved your issue, please consider posting a summary of any additional details you've learned. Your new knowledge may help others in the future.