[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] OT: anyone successfully use the CLKPR feature in them
RE: [avr-gcc-list] OT: anyone successfully use the CLKPR feature in themega88?
Wed, 4 Oct 2006 09:20:03 -0700
While generating a minimal test case I discovered that the feature works
exactly as advertised, no funky NOP's needed. So, my problem was
(naturally) my own clumsiness.
I don't know why (yet) but I am guessing that by resetting the CLKPR in my
interrupt handler I ran a-foul of a classic failure: my state variable
tracking the CPU speed was not declared volatile and would get out of phase
every so often (one hint was the regularity that the speed change failed,
about once every four control cycles...)
The speed change works reliably after I pulled the reset out of the handler
and put everything into the main loop.
| -----Original Message-----
| From: Joerg Wunsch [mailto:address@hidden
| Sent: Tuesday, October 03, 2006 9:42 PM
| To: address@hidden
| Cc: address@hidden
| Subject: Re: [avr-gcc-list] OT: anyone successfully use the CLKPR feature
| in themega88?
| "larry barello" <address@hidden> wrote:
| > The overt symptoms are that the clock doesn't bump up reliably. I
| > suspect that it doesn't bump down reliably either, but at 11mhz &
| > 50hz timer tick I wouldn't notice the code taking several tries.
| You could always program the CKOUT fuse (provided your stuff connected
| to PORT B0 would tolerate that), and monitor the clock frequency
| cheers, J"org .-.-. --... ...-- -.. . DL8DTL
| http://www.sax.de/~joerg/ NIC: JW11-RIPE
| Never trust an operating system you don't have sources for. ;-)