Hello,

I am trying to debug a ST NucleoF411 board. First I had to add
F411 and F401BC/F402DE ids. Post to zylin follows as time allows.  

On the chip runs a small sample programm written with NutOs. As the program
is small, the CPU is sleeping nearly all the time and OpenOCD has problems
to attach:
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f4x.cpu failed, GDB will be halted. Polling again in 100ms
Info : Previous state query failed, trying to reconnect
Polling target stm32f4x.cpu succeeded again, trying to reexamine

and so on ...

So I added to stm32f4.cfg:
proc stm32f4_default_examine_end {} {
  # Enable debug during low power modes (uses more power)
  mww 0xe0042004 0x00000007 ;# DBGMCU_CR = DBG_STANDBY | DBG_STOP | DBG_SLEEP

  # Stop watchdog counters during halt
  mww 0xe0042008 0x00001800 ;# DBGMCU_APB1_FZ = DBG_IWDG_STOP | DBG_WWDG_STOP
}

$_TARGETNAME configure -event examine-end { stm32f4_default_examine_end }

However on the first start of openocd after power-up of the CPU, the problem
is still reported endless. Only after exit of openocd, with the next start
things work as expected, without the communication failure.

So probably after the detection of the CPU type, but before the callout to "
-event examine-end" the communication hangs. Could the callout be made
earlier? Or another event be sent right after detection? Or is there
something wrong with my effort?

Thanks
-- 
Uwe Bonnes                [email protected]

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

------------------------------------------------------------------------------
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to