NeonLightions wrote:
Do you have any suggestion to fix this issue?
I would start by figuring out exactly at what happens exactly when the loop gets "stuck", by single-stepping instruction-at-a-time using a debugger.
NeonLightions wrote:
Yes, I have single-steped the code and it is very.... normal. It doesn't do anything cause crash or something, it's just... getting stop right there and and do nothing more.
What is the last instruction that executes before it seems to stop? And what are the relevant register values at that point, i.e is it writing some particular location in memory? What is the value of the stack pointer register at that point?
NeonLightions wrote:
neon wrote:
Hi,
Based on the data in the last response...what happens if you disable hardware interrupts (cli instruction) before any of this?
I have done that and it's useless.
Yet, the trace you pasted showed an interrupt being handled and that this is possible where execution jumped to address 0x0. Maybe disabling interrupts doesn't make your code work as intended, but it's almost certainly changing something. And it certainly looks like you need to have interrupts disabled.
Then, if you still have a problem, the key thing is - what is the last instruction
within the loop that executes, and what are the register values at that point?