tinyriscv-openocd/tcl
Tomas Vanek 6d5b4d709c flash Kinetis: Detect RESET/WDOG loop, fix detection of secured MCU
Kinetis driver checks MDM STAT register to detect secured state of MCU.
Original version often reported a blank device as secured one.
Change #3010 has not fixed all false reports.
After changes in arm_adi_v5 infrastructure secured devices was not detected
at all.

New algorithm uses multiple MDM STAT reads and counts MDM_STAT_SYSSEC and
MDM_STAT_FREADY bits. Both secured MCU and MCU locked-up in RESET/WDOG loop
are detected reliably.

Detection is run in both kx.cfg and klx.cfg from examine-start event,
not examine-end as before. Event is configured only for non hla adapter.

Minor fix in klx.cfg: commented out adapter_khz 24000 in reset-init.
Such frequency is not supported in VLPR CPU mode and with JTAG.

Change-Id: I2ec2b68c45bde9898159cd15fbdcbcfa538c41d9
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/3547
Tested-by: jenkins
Reviewed-by: Steven Stallion <stallion@squareup.com>
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
2016-08-14 09:10:06 +01:00
..
board tcl/board: add Marsohod CPLD board config 2016-08-14 02:05:41 +01:00
chip Fix a typo. 2013-07-07 13:00:59 +00:00
cpld tcl/cpld: add config file for Altera EPM240 CPLD (MAXII family) 2016-08-14 02:05:34 +01:00
cpu/arm Move TCL script files -- Step 2 of 2: 2009-05-27 06:49:24 +00:00
fpga tcl/fpga: add config file for Altera 10M50 FPGA (MAX10 family) 2016-08-14 02:05:18 +01:00
interface interface: Add XDS100v3 support. 2016-08-14 02:04:46 +01:00
target flash Kinetis: Detect RESET/WDOG loop, fix detection of secured MCU 2016-08-14 09:10:06 +01:00
test TCL scripts: replace "puts" with "echo" 2010-11-09 08:12:51 +01:00
tools tcl: add TP-LINK TL-MR3020 to the firmware recovery script 2015-02-11 15:30:28 +00:00
bitsbytes.tcl TCL scripts: replace "puts" with "echo" 2010-11-09 08:12:51 +01:00
mem_helper.tcl tcl: add mrb command to mem_helper.tcl 2016-07-17 22:36:47 +01:00
memory.tcl target: add "phys" argument to mem2array, array2mem 2016-08-09 14:32:12 +01:00
mmr_helpers.tcl TCL scripts: replace "puts" with "echo" 2010-11-09 08:12:51 +01:00