diff options
author | Salvador Arroyo <sarroyofdez@yahoo.es> | 2012-08-22 20:34:02 +0200 |
---|---|---|
committer | Freddie Chopin <freddie.chopin@gmail.com> | 2012-08-29 06:25:01 +0000 |
commit | a25e61ecd364eae32e45d0903f241bfd62b82782 (patch) | |
tree | 5053236f780665f3b638f420bc8ddf329c5faead /src | |
parent | 2ce4e31bbcfabc06b7ac71d2e507e707d293c5c0 (diff) | |
download | riscv-openocd-a25e61ecd364eae32e45d0903f241bfd62b82782.zip riscv-openocd-a25e61ecd364eae32e45d0903f241bfd62b82782.tar.gz riscv-openocd-a25e61ecd364eae32e45d0903f241bfd62b82782.tar.bz2 |
Patch: Make pic32mx unlock work at higher scan frequencies
For example in a pic32mx220, pic32mx unlock don't work
if adapter_khz is set to 5000 or more.
A short delay after asserting reset fix the problem.
Change-Id: I62e493edfcea585c36c8de77a969cebac7227b96
Signed-off-by: Salvador Arroyo <sarroyofdez@yahoo.es>
Reviewed-on: http://openocd.zylin.com/790
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/flash/nor/pic32mx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/flash/nor/pic32mx.c b/src/flash/nor/pic32mx.c index 788a3b9..b718c98 100644 --- a/src/flash/nor/pic32mx.c +++ b/src/flash/nor/pic32mx.c @@ -28,6 +28,7 @@ #include "config.h" #endif +#include <jtag/jtag.h> #include "imp.h" #include <target/algorithm.h> #include <target/mips32.h> @@ -828,6 +829,7 @@ COMMAND_HANDLER(pic32mx_handle_unlock_command) /* unlock/erase device */ mips_ejtag_drscan_8_out(ejtag_info, MCHP_ASERT_RST); + jtag_add_sleep(200); mips_ejtag_drscan_8_out(ejtag_info, MCHP_ERASE); |