STM32f401 upload

Post here all questions related to STM32 core if you can't find a relevant section!
Post Reply
daddyben
Posts: 2
Joined: Tue Oct 27, 2020 7:01 pm

STM32f401 upload

Post by daddyben »

hello all, I have a problem that happens every once in a while with my f401 chip, while uploading code after I press reset to upload the code, computer will say malfunction in chip not recognized , so I have to unplug the chip from the usb and plug it back in after a few attempts it will work again, is it the reset sw getting bad on the chip ? IM using arduino IDE and prog by usb serial.
fredbox
Posts: 125
Joined: Thu Dec 19, 2019 3:05 am
Answers: 2

Re: STM32f401 upload

Post by fredbox »

STM32F401 has DFU mode built in.

Set Boot0=1 and upload method to STM32CubeProgrammer (DFU).
With USB port connected, press reset and upload. Your program should start automatically.
During development, you can leave Boot0=1, putting it back to 0 when you are finished coding.

If you need serial output, set the CDC options to enable serial communications.

The boards I have use a USB-C connector.

Code: Select all

      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.3.0                  
      -------------------------------------------------------------------
USB speed   : Full Speed (12MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : STM32  BOOTLOADER
SN          : 356436553433
FW version  : 0x011a
Device ID   : 0x0423
Device name : STM32F401xB/C
Flash size  : 256 KBytes (default)
Device type : MCU
Device CPU  : Cortex-M4
Memory Programming ...
Opening and parsing file: Blink.ino.bin
  File          : Blink.ino.bin
  Size          : 8940 Bytes
  Address       : 0x08000000 
Erasing memory corresponding to segment 0:
Erasing internal memory sector 0
erasing sector 0000 @: 0x08000000 done
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:00.511
RUNNING Program ... 
  Address:      : 0x8000000
Start operation achieved successfully
Post Reply

Return to “General discussion”