Florian Uekermann
2017-04-21 14:52:31 UTC
Hi everyone,
"flash erase_sector" fails with my Kinetis L 27Z (kl27z) via ST-Link/V2.
This prevents programming.
Command:
openocd -d3 -f interface/stlink-v2.cfg -f target/klx.cfg -c "init; reset
halt; flash erase_sector 0 0 15"
Full output: https://pastebin.com/UnmyDQ0t
I guess the interesting part of the output is:
GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.10.0-00114-g8419536
(2017-04-18-22:28)
<snip>
Debug: 458 37 command.c:143 script_debug(): command - ocd_flash
ocd_flash erase_sector 0 0 15
Debug: 460 37 hla_target.c:750 adapter_read_memory():
adapter_read_memory 0x40048024 4 1
Debug: 461 37 target.c:2240 target_read_u32(): address: 0x40048024,
value: 0x23161d82
Debug: 462 37 hla_target.c:750 adapter_read_memory():
adapter_read_memory 0x4004804c 4 1
Debug: 463 38 target.c:2240 target_read_u32(): address: 0x4004804c,
value: 0x09000000
Debug: 464 38 hla_target.c:750 adapter_read_memory():
adapter_read_memory 0x40048050 4 1
Debug: 465 38 target.c:2240 target_read_u32(): address: 0x40048050,
value: 0x10900000
Debug: 466 38 kinetis.c:1765 kinetis_probe(): SDID: 0x23161D82 FCFG1:
0x09000000 FCFG2: 0x10900000
Debug: 467 38 kinetis.c:1884 kinetis_probe(): FlexNVM: 0 PFlash: 262144
FlexRAM: 0 PFLSH: 1
Debug: 468 38 kinetis.c:1891 kinetis_probe(): 2 blocks total: 2 PFlash,
0 FlexNVM
Info : 469 38 kinetis.c:1893 kinetis_probe(): Probing flash info for bank 0
Debug: 470 38 hla_target.c:750 adapter_read_memory():
adapter_read_memory 0x4007e003 1 1
Debug: 471 39 target.c:2286 target_read_u8(): address: 0x4007e003,
value: 0x01
Debug: 472 39 hla_target.c:750 adapter_read_memory():
adapter_read_memory 0x40020000 1 1
Debug: 473 39 target.c:2286 target_read_u8(): address: 0x40020000,
value: 0x80
Debug: 474 39 hla_target.c:764 adapter_write_memory():
adapter_write_memory 0x40020004 4 3
Debug: 475 40 target.c:2368 target_write_u8(): address: 0x40020000,
value: 0x80
Debug: 476 40 hla_target.c:764 adapter_write_memory():
adapter_write_memory 0x40020000 1 1
Debug: 477 40 stlink_usb.c:407 stlink_usb_error_check(): Verify error
Debug: 478 40 target.c:2372 target_write_u8(): failed: -4
Warn : 479 40 kinetis.c:1223 kinetis_erase(): erase sector 0 failed
Error: 480 40 core.c:45 flash_driver_erase(): failed erasing sectors 0 to 15
Best regards,
Florian
"flash erase_sector" fails with my Kinetis L 27Z (kl27z) via ST-Link/V2.
This prevents programming.
Command:
openocd -d3 -f interface/stlink-v2.cfg -f target/klx.cfg -c "init; reset
halt; flash erase_sector 0 0 15"
Full output: https://pastebin.com/UnmyDQ0t
I guess the interesting part of the output is:
GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.10.0-00114-g8419536
(2017-04-18-22:28)
<snip>
Debug: 458 37 command.c:143 script_debug(): command - ocd_flash
ocd_flash erase_sector 0 0 15
Debug: 460 37 hla_target.c:750 adapter_read_memory():
adapter_read_memory 0x40048024 4 1
Debug: 461 37 target.c:2240 target_read_u32(): address: 0x40048024,
value: 0x23161d82
Debug: 462 37 hla_target.c:750 adapter_read_memory():
adapter_read_memory 0x4004804c 4 1
Debug: 463 38 target.c:2240 target_read_u32(): address: 0x4004804c,
value: 0x09000000
Debug: 464 38 hla_target.c:750 adapter_read_memory():
adapter_read_memory 0x40048050 4 1
Debug: 465 38 target.c:2240 target_read_u32(): address: 0x40048050,
value: 0x10900000
Debug: 466 38 kinetis.c:1765 kinetis_probe(): SDID: 0x23161D82 FCFG1:
0x09000000 FCFG2: 0x10900000
Debug: 467 38 kinetis.c:1884 kinetis_probe(): FlexNVM: 0 PFlash: 262144
FlexRAM: 0 PFLSH: 1
Debug: 468 38 kinetis.c:1891 kinetis_probe(): 2 blocks total: 2 PFlash,
0 FlexNVM
Info : 469 38 kinetis.c:1893 kinetis_probe(): Probing flash info for bank 0
Debug: 470 38 hla_target.c:750 adapter_read_memory():
adapter_read_memory 0x4007e003 1 1
Debug: 471 39 target.c:2286 target_read_u8(): address: 0x4007e003,
value: 0x01
Debug: 472 39 hla_target.c:750 adapter_read_memory():
adapter_read_memory 0x40020000 1 1
Debug: 473 39 target.c:2286 target_read_u8(): address: 0x40020000,
value: 0x80
Debug: 474 39 hla_target.c:764 adapter_write_memory():
adapter_write_memory 0x40020004 4 3
Debug: 475 40 target.c:2368 target_write_u8(): address: 0x40020000,
value: 0x80
Debug: 476 40 hla_target.c:764 adapter_write_memory():
adapter_write_memory 0x40020000 1 1
Debug: 477 40 stlink_usb.c:407 stlink_usb_error_check(): Verify error
Debug: 478 40 target.c:2372 target_write_u8(): failed: -4
Warn : 479 40 kinetis.c:1223 kinetis_erase(): erase sector 0 failed
Error: 480 40 core.c:45 flash_driver_erase(): failed erasing sectors 0 to 15
Best regards,
Florian