2025-10-12 2:35 AM - last edited on 2025-10-12 5:32 AM by STOne-32
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
2025-10-12 8:14 AM
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
2025-10-12 9:21 AM
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.