[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] AvrX and pgm_read_byte_near()
From: |
Brian Cuthie |
Subject: |
[avr-gcc-list] AvrX and pgm_read_byte_near() |
Date: |
Mon, 24 Nov 2003 18:37:27 -0500 |
So I have an AvrX task that spins something like this:
unsigned char b;
while (1) {
b = pgm_read_byte_near(0x54 /* or some other small
address */);
/* write something to I/O so I can see what's happening
*/
/* delay */
AvrXDelay(&timer2, 100);
}
Strangely, if I run this the I/O happens once and never again. If I
remove 'pgm_read_byte_near()' it works great.
Before I get some more gray hair trying to figure out what's hosing AvrX
(I'm guessing using the Z register has it unhappy), I thought I'd post
something here in hopes that I'm not the first person to see this
behavior.
Thanks
-brian
- [avr-gcc-list] AvrX and pgm_read_byte_near(),
Brian Cuthie <=