Hi Chris, I'm not an expert, nor a typical poster on this list, but have you properly configured the DBGMCU_CR register to allow debugging support while the STM32 is in STOP mode?
Best, Kyle On Fri, Oct 29, 2010 at 2:58 PM, Chris Jones <ch...@martin-jones.com> wrote: > Hi all, > > I'm using OpenOCD (version 0.4.0, downloaded from SourceForge and built > about half an hour ago) on Debian Lenny (5.0, stable) running under VMWare > Fusion on an x86 Mac Pro. The microcontroller I'm using is an STM32F103C6T6, > and the JTAG dongle is an Amontec JTAGKey. By and large it works: I can > program the flash, halt, use gdb, all the things I'd expect from OpenOCD. > > But there's a way of breaking it semi-permanently. The application on the > STM32 is one which spends most of its time with the CPU in Stop mode, waking > up periodically (about every 12ms) via an RTC interrupt to do some > processing. If I attempt to start OpenOCD while the microcontroller is > stopping and running like this, I get messages which say, > > Warn : Timeout (1000ms) waiting for ACK=OK/FAULT in JTAG-DP transaction > > and OpenOCD just won't work, though it finds the TAPs correctly so the JTAG > hardware is clearly working to some extent. > > The whole JTAG system appears to be then stuck in this state. Restarting > OpenOCD, doing a hardware system reset on the microcontroller, unplugging > everything including the JTAG dongle and its USB interface, all make no > difference. I've even tried exercising the JTAG port using another > application (XJTAG) though this only does boundary scan testing and doesn't > play with the ARM debug TAP. Though boundary scan works fine. > > The only thing which fixes the problem is power-cycling the STM32 chip > itself. I note from its documentation and the ARM Cortex-M3 TRM that some > parts of the core debug unit are only reset at power up, not in response to > a system reset. The device has no TRST pin. > > However, this board is going to be permanently moulded into a plastic lump > with a battery, so power cycling it is *not* an option. > > Am I stuck? Or is there a way of finding out how the Cortex-M3 debug unit > is wedged, if that's the case, and tickling it back to life? > > Thank you > Chris > -- > Chris Jones - ch...@martin-jones.com > Martin-Jones Technology Ltd > 148 Catharine Street, Cambridge, CB1 3AR, UK > Phone +44 (0) 1223 655611 Fax +44 (0) 870 112 3908 > _______________________________________________ > Openocd-development mailing list > Openocd-development@lists.berlios.de > https://lists.berlios.de/mailman/listinfo/openocd-development >
_______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development