This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

JTAG Communications Failure when writing to Flash

I'm using ULINK to step through my XC161 application.

Every time my application attempts to write to the XC161 internal flash memory from within my application I get an error dialog box that shows the message "JTAG Communication Failure".

I don't think there is anything wrong with my flash erase/write routines, they work perfectly when the debugger is not stepping through the code. I only get this message when using the debugger.

I assume it has something to do with the debugger not expecting the contents of the flash memory to change. I have unchecked the "Verify" option on the flash programming routine, but that did not make any difference.

Or maybe it's because the flash-erase and flash-write routines operate out of (onboard) RAM. Maybe the debugger doesn't like that either.

Does anyone know of any way I can debug my code and write to flash in my application, without getting that error?

Regards
Paul

0