I'm running an eCos application which do a lot of mathematical computation. The problem is that application crashes after a few seconds or minutes. Moreover, when I connect the JTAG (OSBDM) and run the OpenOCD (Open On-Chip Debugger 0.7.0 (2013-08-04-09:35)) even when the OpenOCD is started just for few seconds, the microcontroller runs smoothly without a crash.
Connecting OSBDM (physically) without starting OpenOCD also finishes with application crash.
Unfortunately, when the processor is crashed I can start OpenOCD but I can't halt the processor to see what state is it.
Log from OpenOCD when the processor is crashed tells:
Info : 259 2395 server.c:83 add_connection(): accepting 'telnet' connection from 4444
Debug: 260 5058 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_halt
Debug: 261 5058 command.c:145 script_debug(): command - halt ocd_halt
Debug: 263 5060 target.c:2460 handle_halt_command(): -
Debug: 264 5060 cortex_m.c:596 cortex_m3_halt(): target->state: unknown
Warn : 265 5060 cortex_m.c:604 cortex_m3_halt(): target was in unknown state when halt was requested
Debug: 266 5063 target.c:2442 target_wait_state(): waiting for target halted...
Info : 268 6063 target.c:455 target_poll(): Halt timed out, wake up GDB.
Debug: 269 6063 target.c:1294 target_call_event_callbacks(): target event 0 (gdb-halt)
Error: 278 10064 target.c:2450 target_wait_state(): timed out while waiting for target halted
Debug: 279 10064 command.c:631 run_command(): Command failed with error code -4
User : 280 10064 command.c:669 command_run_line(): in procedure 'halt'
Debug: 281 13409 command.c:145 script_debug(): command - ocd_command ocd_command type ocd_exit
Debug: 282 13410 command.c:145 script_debug(): command - exit ocd_exit
Info : 284 13412 server.c:476 server_loop(): dropped 'telnet' connection
I compare OpenOCD logs when I start it under processor is running without problems and when it crashed. There is only one difference:
- under working system
arm_adi_v5.c:959 dap_syssec_kinetis_mdmap(): MDM_REG_STAT 0004003A
- under crashed system
arm_adi_v5.c:959 dap_syssec_kinetis_mdmap(): MDM_REG_STAT 0000003A
The difference bit is 'Core SLEEPING' from MDM-AP status.
Does anybody meet similar problem? Why I can't halt the processor even when the connection between OSBDM and processor's JTAG is alive (I have connected LA)?
Thanks for any suggestions.