Am pulling my hair out for 2 days on this issue - appreciate ANY help or experiments-to-try as I'm currently out of ideas.
Won't bore you with details, but I'm building large VU-meters, and I've found a point in my code where I read RAM and it's not what was stored there, breaking all the ensuing logic of course.
Attached is a screenshot of AVR Studio, showing the code snippet where I'm having the trouble. I'm connected to the ATMega1284 via JTAG. In this short snippet, I try 3 different set of instructions to read RAM address $010D and $010E. All come back with values that don't match the $3F, $F7 actually stored there.
Some things I've done:
1) all interrupts disabled and I am single-stepping anyhow
2) ATMega1284 on external 20mhz crystal - also tried with Div8 fuse on (2.5mhz) and still have the problem
1) tried 4 processors - all have same problem,
2) set BOD=2.7v and 5v supply is very clean at 5.05v,
3) verified ground to processor is good,
4) tried Simulator and it shows RAM reading correct values
5) checked for any Atmel-errata or board discussion here - none.
I've used the ATMega1284 for 5-6 other projects and haven't run into such a problem.
Thanks in advance for any ideas.