This is an automated email from Gerrit. Spencer Oliver ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/576
-- gerrit commit 24b6bae5c65927bc177b3055ed5a0599e0956700 Author: Spencer Oliver <[email protected]> Date: Thu Apr 19 14:02:03 2012 +0100 stlink: use SYSRESETREQ for stlink_usb_reset Currently the stlink reset does the equiv of a VECTRESET, which does not reset the peripherals. Adding SYSRESETREQ call enables us to reset the peripherals aswell. Change-Id: I098b5706b7db5648fc7866bf12ffd426ec9f93b9 Signed-off-by: Spencer Oliver <[email protected]> diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c index 68179c3..caeb733 100644 --- a/src/jtag/drivers/stlink_usb.c +++ b/src/jtag/drivers/stlink_usb.c @@ -764,6 +764,13 @@ static int stlink_usb_reset(void *handle) h = (struct stlink_usb_handle_s *)handle; + /* use cortex dhcsr to reset the core, this gives us the equiv + * of a srst reset on the stm32 */ + + stlink_usb_write_debug_reg(handle, DCB_DHCSR, DBGKEY|C_DEBUGEN); + stlink_usb_write_debug_reg(handle, DCB_DEMCR, VC_CORERESET); + stlink_usb_write_debug_reg(handle, NVIC_AIRCR, AIRCR_VECTKEY | AIRCR_SYSRESETREQ); + stlink_usb_init_buffer(handle, STLINK_RX_EP, 2); h->cmdbuf[h->cmdidx++] = STLINK_DEBUG_COMMAND; -- ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
