aboutsummaryrefslogtreecommitdiff
path: root/doc/openocd.texi
diff options
context:
space:
mode:
authorSteven Stallion <stallion@squareup.com>2016-07-09 22:17:14 -0500
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2016-08-14 09:06:06 +0100
commit8285ec4cb06b8809761717a6ac420112ea7b2908 (patch)
tree3f807956adb623857d4a657e2c51a98f246abb7d /doc/openocd.texi
parenta7984eef039730fedb9d99bdc6205f956a2daad7 (diff)
downloadriscv-openocd-8285ec4cb06b8809761717a6ac420112ea7b2908.zip
riscv-openocd-8285ec4cb06b8809761717a6ac420112ea7b2908.tar.gz
riscv-openocd-8285ec4cb06b8809761717a6ac420112ea7b2908.tar.bz2
kinetis: support mass erase on boards without SRST
NXP (nee Freescale) documents the mass erase procedure using the MDM-AP block in AN4835. Existing support for this feature did not properly handle boards without SRST. This patch updates the mass_erase command such that it works correctly on these boards. Additionally, the core is left in a halted state once complete to prevent reset loops due to the watchdog as reported by some users. Since the MDM-AP provides an additional method of halting and resetting the core that is disconnected from the DAP, additional commands are provided to manage this state. These commands are particularly helpful when connecting to a target with an unknown state. Change-Id: I40f006d5d964befb12b019c5d509988decdd3f91 Signed-off-by: Steven Stallion <stallion@squareup.com> Reviewed-on: http://openocd.zylin.com/3540 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'doc/openocd.texi')
-rw-r--r--doc/openocd.texi18
1 files changed, 14 insertions, 4 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi
index 1632e42..cef1cae 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -5290,11 +5290,16 @@ flash bank $_FLASHNAME kinetis 0 0 0 0 $_TARGETNAME
Checks status of device security lock. Used internally in examine-end event.
@end deffn
+@deffn Command {kinetis mdm halt}
+Issues a halt via the MDM-AP. This command can be used to break a watchdog reset
+loop when connecting to an unsecured target.
+@end deffn
+
@deffn Command {kinetis mdm mass_erase}
-Issues a complete Flash erase via the MDM-AP.
-This can be used to erase a chip back to its factory state.
-Command removes security lock from a device (use of SRST highly recommended).
-It does not require the processor to be halted.
+Issues a complete flash erase via the MDM-AP. This can be used to erase a chip
+back to its factory state, removing security. It does not require the processor
+to be halted, however the target will remain in a halted state after this
+command completes.
@end deffn
@deffn Command {kinetis nvm_partition}
@@ -5327,6 +5332,11 @@ kinetis nvm_partition eebkp 16 1024 1024 off
@end example
@end deffn
+@deffn Command {kinetis mdm reset}
+Issues a reset via the MDM-AP. This causes the MCU to output a low pulse on the
+RESET pin, which can be used to reset other hardware on board.
+@end deffn
+
@deffn Command {kinetis disable_wdog}
For Kx devices only (KLx has different COP watchdog, it is not supported).
Command disables watchdog timer.