AnsweredAssumed Answered

debugging in STOP mode

Question asked by Trevor on Jan 7, 2014
Latest reply on Oct 19, 2015 by abid.hassan
I develop a lot of low power applications using STM32 and I'd like the ability to use the debugger while in low power STOP mode. My code works as expected in release mode (i.e. no debugger) but when debugging as soon as the processor enters STOP mode it exits STOP mode. Even if I disable all interrupt sources that could wake it up (RTC alarm and EXTI pin interrupts) it still exits STOP mode immediately. I have added the following at the beginning of main to setup the debug register:
#ifdef DEBUG
   DBGMCU->CR = DBGMCU_STOP;
#endif

Processor: STM32F103 (same issue on STM32F101)
Tool chain: Rowley Crossworks for ARM 1.7 build 22
JTAG: ARM-USB-TINY (Olimex)

I would appreciate any  ideas.

Regards
Trevor

Outcomes