2023-06-07 03:25 AM
Hello everyone,
I'm working on STM32F401RE and I'm in the middle of designing a circuit.
I have 2 questions:
1- Is it possible to use the USB_DP & USB_DM (PA_11 / PA_12) pins in serial TX & RX mode in addition to the USB_DFU mode? I mean, can I physically have 2 functions on the same pin? As the USB_DFU only injects the .bin when BOOT_0 is pressed.
2 Is it possible to use the BOOT_0 & BOOT_1 (BOOT_0/ PB_2) pins in IO once the MCU has started up? I specify that I use these pins to start the MCU in DFU mode?
Thank you in advance for your reply.
Antoine
Solved! Go to Solution.
2023-06-07 08:06 AM
You can use PA11/PA12 as USB for bootloader, and UART in your program, provided that your pullup scheme for UART is compatible with USB. I doubt an external pullup will be acceptable here.
It's not possible to use BOOT0 as a GPIO. You can use PB2 normally after startup.
This chip doesn't have a BOOT1 pin per the datasheet. Could be an omission, could mean BOOT1=0 always.
2023-06-07 08:06 AM
You can use PA11/PA12 as USB for bootloader, and UART in your program, provided that your pullup scheme for UART is compatible with USB. I doubt an external pullup will be acceptable here.
It's not possible to use BOOT0 as a GPIO. You can use PB2 normally after startup.
This chip doesn't have a BOOT1 pin per the datasheet. Could be an omission, could mean BOOT1=0 always.