On Mon, Dec 13, 2010 at 10:16 AM, Spencer Oliver <s...@spen-soft.co.uk> wrote: > On 13/12/2010 08:47, Manuel Borchers wrote: >> >> Hi Andreas, hi list, >> >> On Sun, 2010-12-12 at 21:12 +0100, Andreas Fritiofson wrote: >>> >>> It may be that the scheduler or the idle thread puts the core in low >>> power mode if no thread is ready to run. That will break the debugger >>> connection. See if anything executes a WFI or WFE instruction, and >>> disable it. There's likely a configuration setting for it. >> >> Yes, thanks for hint, I already got a hint on the eCos list about the >> idle thread executing 'wfi'. I suspected something like that but didn't >> find it myself in the sources. >> I also got a hint how to keep the clock for JTAG active when the CPU >> goes to wfi. I'll try that tonight and report back if it didn't solve my >> problem. >> >> Thanks again! >> Cheers, >> Manuel > > Look for the define HAL_IDLE_THREAD_ACTION in > packages/hal/cortexm/arch/current/include/hal_arch.h - i comment that out > while debugging. > > However it does work ok if slow the jtag clock to about 1kHz aswell.
Are you sure? I can't see why that would work. Unless you have a high frequency interrupt running that happens to match with the jtag transitions. Removing WFI/WFE in debug builds, or setting DBGMCU_CR to keep clocks running solves most cases, anyway. //Andreas _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development