Hi!
This is a well known problem. You cannot debug a Cortex-M that is in sleep
mode, because the debug logic is not clocked.
The STM32 chips have a special feature to keep clocks running even during
sleep for exactly this purpose. See the DBGMCU register.
You can use a config like http://openocd.zylin.com/2196 (but adapted for
STM32F4) that sets this register when the chip is examined. Everything
should keep working after that, until the next power-cycle. You'll also
need reset_config connect_assert_srst to be able to connect to the chip in
the first place.
/Andreas
On Sun, Jan 18, 2015 at 2:27 AM, Jens Bauer <[email protected]> wrote:
> Hi all.
>
> On Sun, 18 Jan 2015 01:01:57 +0100, Jens Bauer wrote:
> > If I make the following program:
> >
> > int main() {
> > while(1) {
> > __WFI();
> > }
> > }
>
> Note: If I change __WFI(); to __NOP(); there are no problems.
>
> -One thing I forgot to say is that I'll usually need to take out the
> external crystal, before I attempt to repeat a 'reset halt' until I get the
> target to halt.
>
>
> Love
> Jens
>
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> OpenOCD-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openocd-devel
>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel