I built a custom board that uses a STM32F411CEU6. My problem is that tried to upload a simple blink sketch (I'm using Arduino IDE with STM32 libraries) and I get the error:
ST-LINK SN : 57FF72067166535645342467 ST-LINK FW : V2J37S7 Board : -- Voltage : 3.23V SWD freq : 4000 KHz Connect mode: Under Reset Reset mode : Hardware reset Device ID : 0x431 Revision ID : Rev A Device name : STM32F411xC/E Flash size : 512 KBytes (default) Device type : MCU Device CPU : Cortex-M4 Memory Programming ... Opening and parsing file: Blink.ino.bin File : Blink.ino.bin Size : 11256 Bytes Address : 0x08000000 Erasing memory corresponding to segment 0: Erasing internal memory sector 0 Error: failed to erase memory Error: failed to erase memory RUNNING Program ... Address: : 0x8000000 Warning: The core is locked up Start operation achieved successfully the selected serial port Start operation achieved successfully does not exist or your board is not connected
I'm using an ST-LINK V2 USB pen that works fine. I have a Black Pill with the same STM32 to use as a control and everything works ok.
Also, when I try to check the custom board with STM32CudeProgrammer, I get the error:
22:16:27 : Size : 1024 Bytes 22:16:27 : Address : 0x8000000 22:16:27 : Read progress: 22:16:27 : Error: Data read failed