Started by capiman26061973 March 13, 2008

> While trying to figure out the interrupts
> I encountered the following problem.
> for (;;) {
> if((pitGetPIIR() & 0x000FFFFF) == 0){}
> uart0_putc('A');
> }

i must say sorry, i have don't know or used AT91 yet, just reading
posts about it. So my hint could be nonsense, than just ignore me.

The value you compare is a "self-resetting" hardware counter ?
Could it be that you miss (sometimes / always) the point where the
counter is zero ?

Perhaps you should print out the value of the counter itself in the
for loop, to see if it is running at all ?

> Any idea why I don't get any noticable delay between writes to the
> console?

What do you mean by this ?

Do you want something like this:

for (;;) {
while((pitGetPIIR() & 0x000FFFFF) != 0); // Wait till counter is zero

But pay attention that you can still miss the value zero and then you
get no more output at all (if you always miss it) !


For the AT91SAM9261 the pins that are not being used should I ground these? I am having some EMI issues and want the unused pins just to go straight to ground. Will there be a higher power consumption if I do this?

I just want to be sure
I am not making a silly mistake!

Thank you for your time.


Going green? See the top 12 foods to eat organic.