0

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
3
  • How solve the "The core is locked up" issue and upload the sketch.
    – Miguel
    Jun 8 at 22:06
  • Fix the problem with your board. Whatever that may be.
    – Majenko
    Jun 8 at 23:07
  • stm32duino.com
    – Juraj
    Jun 9 at 4:03
3

The solution:

  1. Open STM32CubeProgramer and click connect
  2. Click Option Bytes (OB) located in the left bar
  3. Select Read Out Protection and choose AA option
  4. Then select PCROP and uncheck the box
  5. Click apply

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.