Closed tgtakaoka closed 6 years ago
The config-timers branch has been created for this issue. https://github.com/tgtakaoka/tinyos-msp430/tree/config-timers
pr#24 and pr#25 solved this issue in some extent.
For timer configuration,
on MCU that has Timer A and Timer B, Timer A is used for millisecond timer and Timer B is used for microsecond timer. Note that this usage is opposite of upstream/tinyos-prod.
There is no Timer D support yet.
For clock system support,
on MCU that has basic clock module, DCO is calibrated to 4MiHz using 32kiHz LFXT1.
on MCU that has basic clock module+, DCO is calibrated to 8MiHz using 32kiHz LFXT1.
This can be overridden by providing custom Msp430CalibrateDco configuration/module that set DCO using CALDCO/CALBC1 calibrated values.
Note that the DCO frequency is compatible with upstream/tinyos-prod, so that serial module constants should be the same.
VLO support is immature but should work. VLO is used as timebase for millisecond timer but not calibrated. We may want to calibrate VLO based on DCO frequency.
CS, UCS, and FLL+ aren't supported yet. We may not want to support XT1/Xt2.
And config-timers branch is abandoned.
Small MSP430 chips have the following varieties of timer configurations. TinyOS for small MSP430 should have configurable and wire-able timer modules.
And chips also have a varieties of clock modules and oscillators. Those should also be configurable and wire-able.
It would be great if there can be clock calibration modules, for instance VLO calibrated by DCO, and DCO calibrated by LFXT1, and etc.