Skip to main content
Visitor II
October 12, 2025
Question

STM32G4CET6 Boot0

  • October 12, 2025
  • 2 replies
  • 642 views

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

    This topic has been closed for replies.

    2 replies

    Graduate II
    October 12, 2025

    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

    Super User
    October 12, 2025

    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