The STM32F4-Discovery board uses either SWD (Serial Wire Debug) or JTAG for programming, and a bootloader is in place for serial communications via the USB. And by default, programming is done via USB using SWD. By checking the user’s manual, it became clear to me that the issue was caused by re-configuring PA11 and PA12 …