Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: documentation of timer interrupts vs bugs

2005-04-21 by arhodes19044

One slightly unexpected (to me) aspect of the interrupt flag 
register function is that a zero menas that the flag is not set.  
When triggered by the CPU it goes to one.


Then when the interrupt is serviced it is cleared by the CPU back to 
zero.  BTW, the docs do not say precisely WHEN during the interrupt 
service routine....  Anyway,  the docs say repeatedly that the flag 
can be cleared by the user BY WRITING A 1 TO THE FLAG REGISTER.  I 
have not tried this in real life, but I would have expected that the 
SW should write a zero to the register.  But apparently writing a 1 
to the register that already has a 1 will reset the 1.....



-Tony

A man once said: "Documented bugs are features only when you want to 
make lemonade."  

I doubt he was wise, because that man was me, just now.


--- In AVR-Chat@yahoogroups.com, David Kelly <dkelly@h...> wrote:
> Atmel says the output compare IRQ is blocked until TCNTn is 
tickled but
> page 11 of appnote AVR130 writes a 0 to TCNT1 in the input capture 
IRQ.
> 
> A wise man once taught me, "If its documented its not a bug, its a
> feature." The only thing odd about this timer behavior is that I 
haven't
> found it documented.
> 
> -- 
> David Kelly N4HHE, dkelly@H...

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.