Processor doesn't run unless JTAG is connected
I'm working on a project where I have 2 boards where the firmware on board them doesn't appear to run unless the JTAG adaptor is physically connected and my embedded workbench is in a debug session. Both of the boards used to run ok but now have stopped working correctly.
One of the boards failed after a reset from the watchdog timer. I'm using the watch dog timer to reset the device to the start of where the secondary bootloader is located, ie I'm forcing the device to reset, using the following code:
WDTC = 0x0001; /* Set watchdog time out value */
WDMOD = 0xFF; /* Enable watchdog timer and reset */
WDFEED = 0xAA;
WDFEED = 0x55;
WDFEED = 0x22;
Has anyone else encountered a problem like this, and where you able to solve it, and if so how?
I'm sorry if this seems a bit vague, but I'm not sure how to trace this problem.
Thank in advance