cancel
Showing results for 
Search instead for 
Did you mean: 

Can't flash firmware/FUS on Nucleo-WB15CC

tester
Associate III

I was able to flash the board successfully many times but it suddenly stopped working when I changed something in the write protection settings. I think it was "WRP1B_END" which is currently 0x0807f80, but I don't remember the default value, maybe someone can tell what it is?

I am using STM32CubeProgrammer v2.14.0, MXCube 6.9.0 and STM32CubeIDE 1.13.0, which all seem to be up to date.

For example, when I try flashing the firmware via STM32Programmer (using newest formware from github master), I get this:

 

  14:17:21:361 : Reading data...
  14:17:21:362 : r ap 0 @0x1FFF75E0 0x00000004 bytes Data 0xFFFF0140
  14:17:21:362 : Old Firmware delete ...
  14:17:21:362 : PROGRAMMING OPTION BYTES AREA ...
  14:17:21:363 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.
  14:17:21:363 : Warning: Option Byte: nboot0, value: 0x1, was not modified.
  14:17:21:363 : Warning: Option Byte: nboot1, value: 0x1, was not modified.
  14:17:21:363 : Warning: Option Bytes are unchanged, Data won't be downloaded
  14:17:21:363 : Time elapsed during option Bytes configuration: 00:00:00.000
  14:17:21:363 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=1 
  14:17:21:363 : Memory Programming ...
  14:17:21:363 : Opening and parsing file: 0x494_FUS_Operator.bin
  14:17:21:368 :   File          : 0x494_FUS_Operator.bin
  14:17:21:368 :   Size          : 8.00 KB 
  14:17:21:368 :   Address       : 0x08000000 
  14:17:21:368 : Erasing Segment <0> Address <0x08000000> Size <8192>Bytes
  14:17:21:368 : Erasing memory corresponding to segment 0:
  14:17:21:368 : Memory Erase via FlashLoader!
  14:17:21:368 : Memory erase...
  14:17:21:370 : halt ap 0 
  14:17:21:370 : w ap 0 reg 15 PC   (0x20000000)  
  14:17:21:370 : w ap 0 reg 17 MSP  (0x20000500)  
  14:17:21:371 : w ap 0 reg 16 xPSR (0x01000000)  
  14:17:21:376 : w ap 0 @0x20000BA0 : 0x00000200 bytes, Data 0x00000000...
  14:17:21:376 : w ap 0 @0x20000000 : 0x00000004 bytes, Data 0x0000BE00...
  14:17:21:386 : w ap 0 @0x20000004 : 0x00000768 bytes, Data 0xB672B580...
  14:17:21:386 : Erasing internal memory sectors [0 3]
  14:17:21:386 : Init flashloader...
  14:17:21:386 : halt ap 0 
  14:17:21:389 : w ap 0 reg 0 R0   0x00000001
  14:17:21:389 : w ap 0 reg 1 R1   0x00000000
  14:17:21:390 : w ap 0 reg 2 R2   0x00000000
  14:17:21:390 : w ap 0 reg 3 R3   0x00000000
  14:17:21:390 : w ap 0 reg 4 R4   0x00000000
  14:17:21:390 : w ap 0 reg 5 R5   0x00000000
  14:17:21:390 : w ap 0 reg 6 R6   0x00000000
  14:17:21:390 : w ap 0 reg 7 R7   0x00000000
  14:17:21:391 : w ap 0 reg 8 R8   0x00000000
  14:17:21:392 : w ap 0 reg 9 R9   0x00000000
  14:17:21:392 : w ap 0 reg 10 R10  0x00000000
  14:17:21:392 : w ap 0 reg 11 R11  0x00000000
  14:17:21:393 : w ap 0 reg 12 R12  0x00000000
  14:17:21:393 : w ap 0 reg 13 SP   0x00000000
  14:17:21:396 : w ap 0 reg 14 LR   0x20000001
  14:17:21:397 : w ap 0 reg 15 PC   0x20000005
  14:17:21:397 : w ap 0 reg 16 xPSR 0x01000000
  14:17:21:397 : w ap 0 reg 17 MSP  0x20000B68
  14:17:21:397 : w ap 0 reg 18 PSP  0x00000000
  14:17:21:397 : run ap 0 
  14:17:21:397 : halt ap 0 
  14:17:21:397 : r ap 0 reg 0 R0   0x00000001
  14:17:21:397 : Loader sector erase...
  14:17:21:398 : w ap 0 reg 0 R0   0x08000000
  14:17:21:399 : w ap 0 reg 1 R1   0x08001800
  14:17:21:399 : w ap 0 reg 2 R2   0x00000002
  14:17:21:400 : w ap 0 reg 3 R3   0x00000000
  14:17:21:400 : w ap 0 reg 4 R4   0x00000000
  14:17:21:401 : w ap 0 reg 5 R5   0x00000000
  14:17:21:401 : w ap 0 reg 6 R6   0x00000000
  14:17:21:401 : w ap 0 reg 7 R7   0x00000000
  14:17:21:402 : w ap 0 reg 8 R8   0x00000000
  14:17:21:403 : w ap 0 reg 9 R9   0x00000000
  14:17:21:403 : w ap 0 reg 10 R10  0x00000000
  14:17:21:406 : w ap 0 reg 11 R11  0x00000000
  14:17:21:406 : w ap 0 reg 12 R12  0x00000000
  14:17:21:407 : w ap 0 reg 13 SP   0x00000000
  14:17:21:407 : w ap 0 reg 14 LR   0x20000001
  14:17:21:407 : w ap 0 reg 15 PC   0x2000053D
  14:17:21:407 : w ap 0 reg 16 xPSR 0x01000000
  14:17:21:407 : w ap 0 reg 17 MSP  0x20000B68
  14:17:21:408 : w ap 0 reg 18 PSP  0x00000000
  14:17:21:408 : run ap 0 
  14:17:21:409 : halt ap 0 
  14:17:21:409 : r ap 0 reg 0 R0   0x00000001
  14:17:21:409 : erase: 0043ms
  14:17:21:409 : Download in Progress:
  14:17:21:410 :   Size          : 8192 Bytes
  14:17:21:410 :   Address       : 0x08000000 
  14:17:21:410 : Buffer program...
  14:17:21:415 : halt ap 0 
  14:17:21:415 : w ap 0 reg 15 PC   (0x20000000)  
  14:17:21:415 : w ap 0 reg 17 MSP  (0x20000500)  
  14:17:21:415 : w ap 0 reg 16 xPSR (0x01000000)  
  14:17:21:417 : w ap 0 @0x20000BA0 : 0x00000200 bytes, Data 0x00000000...
  14:17:21:417 : w ap 0 @0x20000000 : 0x00000004 bytes, Data 0x0000BE00...
  14:17:21:428 : w ap 0 @0x20000004 : 0x00000768 bytes, Data 0xB672B580...
  14:17:21:428 : Loader write range...
  14:17:21:456 : w ap 0 @0x20000BA0 : 0x00001000 bytes, Data 0x20000820...
  14:17:21:456 : W B1 in RAM @0x20000BA0 size 0x00001000 : 0028ms
  14:17:21:456 : Init flashloader...
  14:17:21:457 : halt ap 0 
  14:17:21:461 : w ap 0 reg 0 R0   0x00000001
  14:17:21:461 : w ap 0 reg 1 R1   0x00000000
  14:17:21:461 : w ap 0 reg 2 R2   0x00000000
  14:17:21:461 : w ap 0 reg 3 R3   0x00000000
  14:17:21:461 : w ap 0 reg 4 R4   0x00000000
  14:17:21:462 : w ap 0 reg 5 R5   0x00000000
  14:17:21:462 : w ap 0 reg 6 R6   0x00000000
  14:17:21:462 : w ap 0 reg 7 R7   0x00000000
  14:17:21:463 : w ap 0 reg 8 R8   0x00000000
  14:17:21:463 : w ap 0 reg 9 R9   0x00000000
  14:17:21:468 : w ap 0 reg 10 R10  0x00000000
  14:17:21:468 : w ap 0 reg 11 R11  0x00000000
  14:17:21:468 : w ap 0 reg 12 R12  0x00000000
  14:17:21:469 : w ap 0 reg 13 SP   0x00000000
  14:17:21:469 : w ap 0 reg 14 LR   0x20000001
  14:17:21:469 : w ap 0 reg 15 PC   0x20000005
  14:17:21:469 : w ap 0 reg 16 xPSR 0x01000000
  14:17:21:469 : w ap 0 reg 17 MSP  0x20000B68
  14:17:21:470 : w ap 0 reg 18 PSP  0x00000000
  14:17:21:470 : run ap 0 
  14:17:21:470 : halt ap 0 
  14:17:21:470 : r ap 0 reg 0 R0   0x00000001
  14:17:21:470 : w ap 0 reg 0 R0   0x08000000
  14:17:21:470 : w ap 0 reg 1 R1   0x00001000
  14:17:21:471 : w ap 0 reg 2 R2   0x20000BA0
  14:17:21:471 : w ap 0 reg 3 R3   0x00000002
  14:17:21:475 : w ap 0 reg 4 R4   0x00000000
  14:17:21:475 : w ap 0 reg 5 R5   0x00000000
  14:17:21:476 : w ap 0 reg 6 R6   0x00000000
  14:17:21:476 : w ap 0 reg 7 R7   0x00000000
  14:17:21:477 : w ap 0 reg 8 R8   0x00000000
  14:17:21:478 : w ap 0 reg 9 R9   0x00000000
  14:17:21:478 : w ap 0 reg 10 R10  0x00000000
  14:17:21:478 : w ap 0 reg 11 R11  0x00000000
  14:17:21:478 : w ap 0 reg 12 R12  0x00000000
  14:17:21:478 : w ap 0 reg 13 SP   0x00000000
  14:17:21:478 : w ap 0 reg 14 LR   0x20000001
  14:17:21:479 : w ap 0 reg 15 PC   0x20000079
  14:17:21:479 : w ap 0 reg 16 xPSR 0x01000000
  14:17:21:479 : w ap 0 reg 17 MSP  0x20000B68
  14:17:21:480 : w ap 0 reg 18 PSP  0x00000000
  14:17:21:480 : run ap 0 
  14:17:21:504 : w ap 0 @0x20001BA0 : 0x00001000 bytes, Data 0x20030000...
  14:17:21:504 : W B2 in RAM @0x20001CA0 size 0x00001000: 0048ms
  14:17:21:505 : r ap 0 reg 0 R0   0x00000001
  14:17:21:505 : Wait W B1 in Flash @0x08000000 size 0x00001000: 0000ms
  14:17:21:508 : w ap 0 reg 0 R0   0x08001000
  14:17:21:509 : w ap 0 reg 1 R1   0x00001000
  14:17:21:509 : w ap 0 reg 2 R2   0x20001BA0
  14:17:21:509 : w ap 0 reg 3 R3   0x00000002
  14:17:21:510 : w ap 0 reg 4 R4   0x00000000
  14:17:21:510 : w ap 0 reg 5 R5   0x00000000
  14:17:21:510 : w ap 0 reg 6 R6   0x00000000
  14:17:21:510 : w ap 0 reg 7 R7   0x00000000
  14:17:21:510 : w ap 0 reg 8 R8   0x00000000
  14:17:21:511 : w ap 0 reg 9 R9   0x00000000
  14:17:21:511 : w ap 0 reg 10 R10  0x00000000
  14:17:21:511 : w ap 0 reg 11 R11  0x00000000
  14:17:21:512 : w ap 0 reg 12 R12  0x00000000
  14:17:21:516 : w ap 0 reg 13 SP   0x00000000
  14:17:21:517 : w ap 0 reg 14 LR   0x20000001
  14:17:21:517 : w ap 0 reg 15 PC   0x20000079
  14:17:21:517 : w ap 0 reg 16 xPSR 0x01000000
  14:17:21:517 : w ap 0 reg 17 MSP  0x20000B68
  14:17:21:517 : w ap 0 reg 18 PSP  0x00000000
  14:17:21:517 : run ap 0 
  14:17:21:524 : r ap 0 reg 0 R0   0x00000001
  14:17:21:524 : Write elapsed time: 0093ms
  14:17:21:524 : Segment[0] downloaded successfully
  14:17:21:524 : File download complete
  14:17:21:524 : Time elapsed during download operation: 00:00:00.157
  14:17:21:524 : w ap 0 @0x20002F04 0x00000004 bytes Data 0x00000000
  14:17:21:528 : w ap 0 reg 15 PC   0xFFFFFFFF
  14:17:21:532 : w ap 0 reg 17 MSP  0xFFFFFFFF
  14:17:21:532 : w ap 0 reg 16 xPSR 0x01000000
  14:17:21:532 : The core is locked up
  14:17:21:532 : w ap 0 @0x20002F00 0x00000004 bytes Data 0x00000002
  14:17:28:530 : Reconnecting...
  14:17:28:531 : Disconnected
  14:17:28:532 : ST-LINK SN  : 066AFF363946433043103121
  14:17:28:532 : ST-LINK FW  : V2J42M27
  14:17:28:532 : Board       : NUCLEO-WB15CC
  14:17:28:533 : Voltage     : 3.26V
  14:17:28:536 : SWD freq    : 4000 KHz
  14:17:28:536 : Connect mode: Hot Plug
  14:17:28:536 : Reset mode  : Software reset
  14:17:28:538 : Device ID   : 0x494
  14:17:28:540 : Revision ID : Rev Z
  14:17:28:540 : Reconnected !
  14:17:28:540 : Success with Time elapsed during Reconnect: 10 ms
  14:17:28:541 : r ap 0 @0x20002F04 0x00000004 bytes Data 0x00000000
  14:17:28:541 : Warning: FUS_STATE_ERR_UNKNOWN
  14:17:28:541 : r ap 0 @0x20002F04 0x00000004 bytes Data 0x00000000

 

FUS info also looks weird?!

tester_0-1690373941092.png

I also can't start the wireless stack:

tester_1-1690373976146.png

I also can't flash user code, I get this:

 

...
Error: Data mismatch found at address 0x08000000 (byte = 0xFF instead of 0x7F)
Error: Download verification failed
...
Warning: The core is locked up

 

When trying to flash user code with STM32CubeIDE I get this:

tester_0-1690375490673.png

1 ACCEPTED SOLUTION

Accepted Solutions
tester
Associate III

I think I fixed it by setting

WRP1B_STRT to Value "0xff" and Address "0x0807f800" and

WRP1B_END  value to "0x0" and address "0x08000000"

View solution in original post

1 REPLY 1
tester
Associate III

I think I fixed it by setting

WRP1B_STRT to Value "0xff" and Address "0x0807f800" and

WRP1B_END  value to "0x0" and address "0x08000000"