On 21.04.2017 16:52, Florian Uekermann wrote: > 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" > Please do not use ST-Link for NXP Kinetis flash programming.
1) It is quite easy to lock a Kinetis device into secure mode. A high level adapter like ST-Link can not issue mass erase to unlock the device. 2) ST-Link unlike other adapters triggers a verify error on every clear of a 'w1c' bit in a register (write one to clear). Also a write to other registers with some read-only bits can do the same. 3) ST-Link does not implement 16-bit read/writes. I recommend you to use a CMSIS-DAP, J-Link or a FTDI based adapter for Kinetis. Tom ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
