cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4CET6 Boot0

ShiYi
Associate

Can I ask how to use my PB8 pin as CAN, since it is Boot 0? I pull Boot 0 to Ground to avoid it floating, then how to use it as CAN pin

2 REPLIES 2
Issamos
Lead II

Hello @ShiYi 

You cannot use a boot pin as an alternate function during the microcontroller's startup, as it is used to determine the boot mode. After the microcontroller boots successfully, the BOOT0 pins can be repurposed and used as GPIO or for other alternate functions. If the CAN\FDCAN is available as Alternate functions for your PB8\BOOT0 pin, you can use this pin for this or any other available alternate function. 
PS: please add the full MCU part number.

Best Regards.

II

TDK
Super User

In the option bytes, set nSWBOOT0 = 0 and nBOOT0 = 0 to always boot from user flash regardless of the BOOT0 pin. Then, you can use the PB8/BOOT0 pin however you want.

TDK_0-1760286034918.png

 

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