9.1 Troubleshooting Guide
Problem | Possible causes | Solution |
---|---|---|
JTAG debugging starts, then suddenly fails. |
1. The Atmel AVR JTAGICE mkII is not sufficiently powered 2. The JTAG Disable bit in the MCUCSR register has been inadvertently written by the application 3. Synchronization is lost. |
1. If the JTAGICE mkII is powered from the USB only, it's required that the USB can deliver 500mA 2. Hold reset low to regain control and change the code so that the JTAG Disable bit is not written. 3. Power cycle the JTAGICE mkII and target board. Decreasing the communication speed between the PC and the JTAGICE mkII may be required. |
After Using the JTAGICE mkII to download code to the device, the emulator no longer works |
1. The JTAG ENABLE fuse has been disabled. 2. The programming interface is still active. It is not possible to use both OCD and programming at the same time |
1. Program the JTAG ENABLE fuse. 2. Close the Programming interface, then enter emulation mode. |
JTAGICE mkII is detected by Atmel Studio or other software front-end, but it will not connect to target device | JTAG: JTAG ENABLE Fuse is not programmed debugWIRE: DWEN Fuse is not programmed |
JTAG: Use an other programming interface to program the JTAG ENABLE Fuse debugWIRE: Use an other programming interface to program the DWEN Fuse |
Atmel Studio gives a message that no voltage is present |
1. No power on target board. 2. Vtref not connected. 3. Target Voltage too low. |
1. Apply power to target board. 2. Make sure your JTAG Connector includes the Vtref signal. 3. Make sure the target power supply is able to provide enough power. |
OCD fuse is disabled, but using the JTAGICE mkII, OCD is still possible | The JTAGICE mkII will automatically program the OCD fuse if it is disabled | This is correct operation |
Some I/O registers are not updated correctly in Atmel Studio I/O view | When non-intrusive read back is not possible, the JTAGICE mkII will not update this location in the Atmel Studio I/O view | Read this I/O location into a temporary register, and view it there during debugging. See the Special considerations section for information about which registers are affected by this. |
Debugging ATmega169 with the Atmel STK500 and Atmel STK502 does not work when using external clock | The TOSC switch on the STK502 is in the TOSC position | Set the switch to the XTAL position on the STK502 board |
Sometimes after using software breakpoints, the target application "freezes" and will not run correctly | The JTAGICE mkII debugging session was not closed properly, and BREAK instructions are still present in the flash area | Make sure that the JTAGICE mkII debugging session is closed properly, or reprogram the flash with the correct hex file |
debugWIRE Emulation start out OK, then suddenly it fails |
1. The JTAGICE mkII is not sufficiently powered. 2. Drivers or active capacitance is disturbing the communication over the RESET-line. 3. Synchronization is lost. |
1. If the JTAGICE mkII is powered from the USB only, it's required that the USB can deliver 500mA. 2. Remove all capacitance or drivers on the RESET-line. Make sure that a any pull-up resistor is larger than 10kΩ. 3. Power cycle the JTAGICE mkII and target board. Decreasing the communication speed between the PC and the JTAGICE mkII may be required. |
SPI programming after a debugWIRE session is not possible | When the debugWIRE Interface is enabled the SPI Interface is disabled | Re-enable the SPI Interface as described in section Special considerations "Connecting to Target through the debugWIRE Interface". Use command line software to re-enable SPI interface. |
Neither SPI nor debugWIRE connection works | The SPI and debugWIRE interface are disabled. DebugWIRE will not work if the lockbits are programmed. | Connect to target with High Voltage Programming. Enable SPI or debugWIRE and clear lockbits if using debugWIRE. |
Error messages, or other strange behavior when using debugWIRE or JTAG | Target is running outside Safe Operation Area. Maximum frequency vs. VCC. | Make sure the target is running within the Safe Operation Area as described in the chapter Electrical Characteristics in the datasheet for the actual part. Lower the frequency and/or increase the voltage. |