tcl/target: Enable using vectreset for CC3320SF targets
authorEdward Fewell <efewell@ti.com>
Mon, 2 Mar 2020 20:04:24 +0000 (14:04 -0600)
committerAntonio Borneo <borneo.antonio@gmail.com>
Tue, 24 Mar 2020 17:18:31 +0000 (17:18 +0000)
commit4d7c48fb80cb65d53ad3bcd57182ffb79b61e5f3
treee34d2b8ff2b28408622b5f0934d64451f8a4ee52
parentd35c44c743d6f471697ed1d204fe5447fd47cefd
tcl/target: Enable using vectreset for CC3320SF targets

On CC32xx family of devices, sysrequest is disabled, and
vectreset is blocked by the boot loader (stops in a while(1)
statement). srst reset can leave the target in a state
that prevents debug.

This change enables using vectreset on SF variants by
moving the PC to the start of the user application in
internal flash. This allows for a more reliable reset,
but with two caveats:

1) This only works for the SF variant with internal
   flash.

2) This only resets the CPU and not any peripherals.

Tested on CC3220SF rev B Launchpad in both SWD and
JTAG modes. Confirmed proper behavior of reset,
reset init, reset halt, and reset run commands.

Update: reworked per comment in code review. Re-tested
with CC3220SF Launchpad as both CC3220SF and as
CC32xx board to confirm reset behavior as expected.

Update: Added adapter srst delay 1100 line to the
CC3200 LaunchXL configuration file.

Change-Id: Ibc042d785c846c2223ae55b8f2410b75ed2df354
Signed-off-by: Edward Fewell <efewell@ti.com>
Reviewed-on: http://openocd.zylin.com/5489
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
tcl/board/ti_cc3200_launchxl.cfg
tcl/board/ti_cc32xx_launchpad.cfg
tcl/target/ti_cc3220sf.cfg
tcl/target/ti_cc32xx.cfg