When I try to debug the code I wrote, sometimes in different places, the debugging process stuck. When I pause the operation I see that program memory is empty (the program memory is 0xFF for all cells). In this situation I got message "Error stepping over".
After I do "stop" and "play", the program loaded again to the program memory.
1. What can be a reason for this problem?
2. How can I solve this problem?
I use JTAGICE mkII and Atmega2561.