[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Strange issues with 16-bit values
From: |
Bob Paddock |
Subject: |
Re: [avr-gcc-list] Strange issues with 16-bit values |
Date: |
Tue, 11 Nov 2008 14:58:24 -0500 |
> while(TCNT3<(uint16_t)benc_period*224UL/255);
One can never have to many parenthesise when
writing something like the above.
I did not look at your code so the following may not be relevant.
If you are having issues with 16-bit register values,
make sure that you are not accessing the same timer
from both inside *and* outside of the interrupt
concurrently. Nor should you nest interrupts of the
same 16-bit timer (not likely you are doing this).
You will get corrupted values at very random intervals.
The problem is explained here:
http://www.atmel.com/dyn/resources/prod_documents/doc1493.pdf
- [avr-gcc-list] Strange issues with 16-bit values, Brian Neltner, 2008/11/07
- Re: [avr-gcc-list] Strange issues with 16-bit values, Brian Neltner, 2008/11/07
- Re: [avr-gcc-list] Strange issues with 16-bit values, David Brown, 2008/11/07
- Re: [avr-gcc-list] Strange issues with 16-bit values, Josef Eisl, 2008/11/07
- Re: [avr-gcc-list] Strange issues with 16-bit values, Brian Neltner, 2008/11/07
- Re: [avr-gcc-list] Strange issues with 16-bit values, Bernard Fouché, 2008/11/11
- Re: [avr-gcc-list] Strange issues with 16-bit values, Brian Neltner, 2008/11/11
- Re: [avr-gcc-list] Strange issues with 16-bit values, David Kelly, 2008/11/11
- Re: [avr-gcc-list] Strange issues with 16-bit values, Brian Neltner, 2008/11/11
- Re: [avr-gcc-list] Strange issues with 16-bit values,
Bob Paddock <=
- Re: [avr-gcc-list] Strange issues with 16-bit values, Brian Neltner, 2008/11/11
- Re: [avr-gcc-list] Strange issues with 16-bit values, Pink Boy, 2008/11/11
Re: [avr-gcc-list] Strange issues with 16-bit values, Bernard Fouché, 2008/11/07