Hello there.
I cant solve this error.
Incrementing an unsigned long variable inside a timer interrupt (atmega2560), when it reaches the border limit of 0xFF, at the next step, 0x100, it gets corrupted.
Tried with C icon and declred it in supplementary code as VOLATILE but no way.
Tried also to understand as implementing an ATOMIC function but without succes.
Does someone drive me in the right direction?
AVR error incrementing unsigned long variable inside interrupt
Moderator: Benj
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: AVR error incrementing unsigned long variable inside interrupt
Could you post your failing program (flowcode source) so we can take a look at what might be the issue?
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis