I am using TWR-S08DC-PT60 board and having problem downloading to the target. Drivers for OBDM is installed and I can see both of the related devices in my device manager; "Open Source BDM - Debug Port" and "PEMicro USB Serial Port (i1)". R54 on the board is populated with a short. I was downloading and debugging with no problem. But after I have programmed the MCU with a code that runs in an infinite loop and toggles pin PTG0, I am no more able to program nor debug the MCU. Also, I am seeing that LEDs around the accelerometer are dim. These were set as digital outputs and were cleared in the program before entering the infinite loop. With an oscilloscope, it is possible to see that there is a ~140 Hz waveform with %99 duty cycle. So these pins are LOW for about 50 usec, about every 7 ms. Also, there is about 800 mVpp, 140 Hz ripple on the RESET pin. RESET pin is sitting at 3.3V with this ripple on it. PTG0 pin have 380 kHz 50% duty cycle square wave on it, which seems normal, since it is toggled in the software. However, every 7 ms, this pin stops toggling for about 100 usec, and sometimes sits on 1.5V level at this time.
Edit: I have noticed that I did not clear the watchdog timer in the infinite loop. Probably, the terms including 7 ms and 140 Hz in the above paragraph are products of this forgetting of clearing the watchdog timer.
This is the error I get:
After this point, I can see, with an oscilloscope, that BKGD pin of the MCU is held LOW, while RESET pin HIGH. I cannot turn the MCU off, as I am using the development board. I press on the reset button populated on the board, then press OK. But these things does not help. Then I get this error:
Clicking on Retry does not help. After clicking on Abort, I see this error message:
What is this problem caused by? How can I solve this?
I have solved the problem by Erich's help. The TWR-S08DC-PT60 (700-27325 rev B) board didn't include a jumper that would let me do a power cycle the CPU. I was trying shorting the output of U5 to ground, but that was not a reliable solution and did not work most of the time. So, I have de-soldered U5, which is the 3.3V LDO, then added a switch. It now works, most of the time, since I can power cycle the CPU.Here is my modified schematic:
And here is my dirty modification:
With the things applied under "Edit" paragraph above, I was having some difficulties programming the board from time to time. I have soldered 10k pull-up resistors to the 3.3V rail on RESET and BKGD pins, which are pin 69 and 70 on unpopulated connector J3. Now, my only problem is the very rare need of power-cycling, which was taken care of with the switch..