Although I really hope you can point out something simple I may have missed, I have to call the IDE into question here.
Below is a code snippet I’ve simplified from the original version to make this conversation easier.
When I step to this line with the debugger, idx = 1 as expected. When I put my breakpoint on timeout (as shown), idx is equal to the stack value as shown.
I’ve tried different hardware, different programmer (different model actually), and investigated the STACK and RAM usage. What else should I be looking at?
This is part of a flash driver that I'm writing for the MC13213. Are there any flashing gotchas I need to watch out for?
This code is currently running from flash ROM address 0xCxxx immediately after and Page Erase at address 0x182C. I plan to move this code into RAM once I've proven it working. Is there any reason it can't run as-is? i.e. Must it be run from RAM?
We'll I think it was the IDE crashing after all. I closed and reopened CodeWarrior and it was complaining about not being able to open my workspace. I had to delete my .metadata folder and rebuild my workspace. Since, then I've been unable to reproduce the issue.
The IDE being unable to open my workspace happens to me on average once every few months, but I've never seen a debugger issue present itself like this before. Anyone else seen similar issues?