Other Parts Discussed in Thread: SYSBIOS
G'Day all,
Sorry for posting so many questions of late. I hope you can consider one more.
I understand that the Clock module uses a TimerA peripheral to keep track of time.
Digging through the registers, I see that SYS-BIOS sets up this peripheral to use ACLK, which is sourced by the LXFTCLK, which on the Launchpad comes is a 32.768kHz oscillator.
As a result, the resolution for the clock module tick period is 1/32768 sec (though the GUI allows setting in uSec resolution and doesn't warn you of the error!)
If you would like a reasonably accurate 1mSec tick, you won't be able to get it from the Clock module if its configured this way.
Ideally I'd like to reconfigure the clock module to run off SMCLK instead of ACLK. The default configuration set SMCLK to 12MHz, so if I set the TIMER ID divder to 4 and the IDEXT divider to 3 (or any other combination that gives me a divide ratio of 12) I get a 1MHz timer clock and now I can really can set the Clock module with 1uSec resolution (though I'd be happy with 10uSec or even 100uSec resolution).
[I'm assuming here that SYSBIOS uses the TimerA in such a way that this change of timebase won't end up causing overflows given the 16bit compare registers].
Since the clock module sets the system wide tick period, every other function that takes a parameter in units of ticks (e.g. task_sleep(), semaphore_pend() etc) will also get the more accurate period.
Can I do this reconfiguration through the GUI (or the .cfg file), or do I have to do it in code? I don't care if this breaks the Seconds module - I'm using the RTC for seconds anyway.
If I can't do this for the Clock module, can I be a bit more direct and instanciate a Timer in SYSBIOS and configure it as described above?
Cheers
Julian


