nleahcim wrote:
I eventually got my interrupt working as well. I'm using it to be level sensitive and not having the problem that you had, interestingly enough. I'm using hte AT91SAM7X256 though, so maybe that accounts for the difference?
Anyways - how accurate did you find the RTT to be? I'm having terrible problems with it's accuracy.
Not sure why level works for you and not me, I thought the RTT peripheral would be the same for the AT91SAM7SE512 as for your processor. Maybe not
Anyway, you have to calibrate the RTT at startup and then maybe also at runtime if you need to (depending on the voltage and ambient temperature variations of your environment).
There is an Atmel app note which describes this and I have some code that does it if you are interested. At startup, after you have initialised the clock generator you can calibrate the RTT. I believe that subsequent calibrations need to stop and restart the master clock and PLL, which is annoying because you have to switch the core to clock from the internal oscillator while you do this!
Also, you have to reset the RTT [and this also resets the counter] when calibrating, which doesn't make it a continuous counter.