2006-10-26 07:43 PM
2006-10-24 05:05 PM
Hi,
The datasheet for ST7DALI states that the ATR is uploaded automatically when the counter overflows. If I have an overflow interrupt routine how far from the start (in terms of time) of the routine I can change ATR so it starts the next count with the new value: // ATR=1000; // initialize ATR at boot interrupt void ATR() { // if I change ATR to 2000 here will the counter start from 2000 ... // some useful code // Here is too late to change ATR, the counter has already started // counting with the old value (1000) } }2006-10-25 07:47 PM
zsavov,
when the auto reload counter overflows, its value is reloaded with the content of ATR register and a flag is raised. This flag, if the auto-reload conter overflow interrupt is enabled, will fire the interrupt handler when any already running interrupt handler releases the ST7 core. Regards EtaPhi2006-10-26 02:07 PM
Hi EtaPhi,
So this means that (long) before the overflow interrupt routine is called the new ATR is uploaded and at the time the overflow interrupt routine is called the ATR counter will have counted for some time. Is that correct? Sorry for the repetiotion, I just want to get the ATR mechanism of work right Thank you2006-10-26 07:43 PM
Yes, zsavov, you are right.