Browse Source

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>
tags/v0.6.0-rc2
Salvador Arroyo 11 years ago
committed by Freddie Chopin
parent
commit
a25e61ecd3
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/flash/nor/pic32mx.c

+ 2
- 0
src/flash/nor/pic32mx.c View File

@@ -28,6 +28,7 @@
#include "config.h" #include "config.h"
#endif #endif


#include <jtag/jtag.h>
#include "imp.h" #include "imp.h"
#include <target/algorithm.h> #include <target/algorithm.h>
#include <target/mips32.h> #include <target/mips32.h>
@@ -828,6 +829,7 @@ COMMAND_HANDLER(pic32mx_handle_unlock_command)


/* unlock/erase device */ /* unlock/erase device */
mips_ejtag_drscan_8_out(ejtag_info, MCHP_ASERT_RST); mips_ejtag_drscan_8_out(ejtag_info, MCHP_ASERT_RST);
jtag_add_sleep(200);


mips_ejtag_drscan_8_out(ejtag_info, MCHP_ERASE); mips_ejtag_drscan_8_out(ejtag_info, MCHP_ERASE);




Loading…
Cancel
Save