cancel
Showing results for 
Search instead for 
Did you mean: 

How to unlock STM32F103C8T6 ?

bully
Senior

Hello,

I have several modules with STM32F103C8T6 (called Blue Pills). But I cannot get them to run

the programs.

I can freely write or read flash memory with stm32cubeprogrammer, but there is always warning (even when I want to start the program), that the core is locked.

How can I unlock the MCU?

Here is the programmer's log :

  13:49:30:294 : STLinkUSBDriver.dll loaded
  13:49:30:295 : STLinkUSBDriver.dll loaded
  13:49:30:295 : ST-LINK SN  : 066EFF564948897767014518
  13:49:30:295 : ST-LINK FW  : V2J37M27
  13:49:30:296 : Board       : NUCLEO-L053R8
  13:49:30:297 : Voltage     : 3.25V
  13:49:30:309 : SWD freq    : 4000 KHz
  13:49:30:310 : Connect mode: Normal
  13:49:30:310 : Reset mode  : Software reset
  13:49:30:317 : Device ID   : 0x410
  13:49:30:321 : Revision ID : Rev X
  13:49:30:342 : flash loader C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin/FlashLoader/0x410.stldr is loaded
  13:49:30:343 : Reading data...
  13:49:30:344 : r ap 0 @0x1FFFF7E0 0x00000004 bytes Data 0xFFFF0040
  13:49:30:520 : UPLOADING OPTION BYTES DATA ...
  13:49:30:520 :   Bank          : 0x00
  13:49:30:520 :   Address       : 0x4002201c
  13:49:30:520 :   Size          : 8 Bytes
  13:49:30:521 : Reading data...
  13:49:30:521 : r ap 0 @0x4002201C 0x00000008 bytes Data 0x03FFFFFC
  13:49:30:521 :   Bank          : 0x01
  13:49:30:521 :   Address       : 0x1ffff800
  13:49:30:521 :   Size          : 16 Bytes
  13:49:30:522 : Reading data...
  13:49:30:522 : r ap 0 @0x1FFFF800 0x00000010 bytes Data 0x00FF5AA5
  13:49:30:522 : UPLOADING OPTION BYTES DATA ...
  13:49:30:522 :   Bank          : 0x00
  13:49:30:522 :   Address       : 0x4002201c
  13:49:30:522 :   Size          : 8 Bytes
  13:49:30:523 : Reading data...
  13:49:30:523 : r ap 0 @0x4002201C 0x00000008 bytes Data 0x03FFFFFC
  13:49:30:523 :   Bank          : 0x01
  13:49:30:523 :   Address       : 0x1ffff800
  13:49:30:523 :   Size          : 16 Bytes
  13:49:30:523 : Reading data...
  13:49:30:523 : r ap 0 @0x1FFFF800 0x00000010 bytes Data 0x00FF5AA5
  13:49:30:524 : UPLOADING ...
  13:49:30:524 :   Size          : 1024 Bytes
  13:49:30:524 :   Address       : 0x8000000
  13:49:30:524 : Read progress:
  13:49:30:524 : Reading data...
  13:49:30:525 : r ap 0 @0x08000000 0x00000400 bytes Data 0x20005000
  13:49:30:526 : Data read successfully
  13:49:30:526 : Time elapsed during the read operation is: 00:00:00.007
  13:49:42:867 : Memory Programming ...
  13:49:42:868 : Opening and parsing file: hid_generic_pc13.bin
  13:49:42:871 :   File          : hid_generic_pc13.bin
  13:49:42:871 :   Size          : 1976 Bytes
  13:49:42:871 :   Address       : 0x08000000 
  13:49:42:872 : Erasing memory corresponding to segment 0:
  13:49:42:882 : Memory erase...
  13:49:42:897 : Erasing internal memory sectors [0 1]
  13:49:42:897 : Init flashloader...
  13:49:42:913 : Loader sector erase...
  13:49:42:942 : Download in Progress:
  13:49:42:943 :   Size          : 1976 Bytes
  13:49:42:943 :   Address       : 0x08000000 
  13:49:42:943 : Buffer program...
  13:49:42:961 : Loader write range...
  13:49:42:976 : Init flashloader...
  13:49:43:038 : Segment[0] downloaded successfully
  13:49:43:039 : File download complete
  13:49:43:061 : Time elapsed during download operation: 00:00:00.170
  13:49:43:062 : Verifying ...
  13:49:43:062 : Read progress:
  13:49:43:062 : Reading data...
  13:49:43:069 : Reading data...
  13:49:43:070 : Download verified successfully 
  13:49:43:097 : RUNNING Program ... 
  13:49:43:097 :   Address:      : 0x08000000
  13:49:43:097 : Warning: The core is locked up
  13:49:43:120 : Start operation achieved successfully

2 REPLIES 2
yellowtomato
Associate II

Have you tried doing mass earase with stm32cubeprogrammer?

Yes, it all works without problem.

I do erase whole chip, flash the program but I'm not sure whether I should do something with Boot jumpers and when...

Somewhere it says, that I should change Boot jumpers to "run from flash" before disconnecting.

Have tried several scenarios, but none works...

But according to programmer, I can write and read Flash properly. I just reports mentioned warning all the time, when it tries to run the program.

Any hint ?