I have a question regarding the JTAG (or DW) interface of some microcontrollers.
Is there a possibility to start up the JTAG interface when the device is "hot"? I mean the device has been up and running for a few days, and then suddenly it freezes. I would like to plug in the JTAG, and download the current state (program, memory, eeprom data, and register - I/O contetns), so I could take a look where the program encountered a never-ending loop, and work out why this has happened.
The biggest problem here is that this happens rarely (around once after 2-3 days), so I cannot keep the JTAG interface connected. (btw this would slow down program execution too, right?).
I thought of having it connected and when the fault occurs just press the pause button, but that would mean that I would have to have a computer running all night long, and I am not sure if it would help either.
So I am asking if you know any good solutions for this? I have been looking at the source code for a good while, cannot find anything that would not be perfectly okay (but of course there must be unless I have a hw problem, but resetting the uC always works, so I guess it is a sw prob).