summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/arch/msp430fr5994lp/driver/timer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/arch/msp430fr5994lp/driver/timer.h b/include/arch/msp430fr5994lp/driver/timer.h
index c07ae4e..9a2c7fe 100644
--- a/include/arch/msp430fr5994lp/driver/timer.h
+++ b/include/arch/msp430fr5994lp/driver/timer.h
@@ -62,6 +62,13 @@ class Timer {
TA0CCR0 = 2000000UL / frequency;
TA0CTL |= TACLR;
}
+
+ inline void setup_hz_low(uint16_t const frequency) { // 250 kHz base
+ TA0CTL = TASSEL__SMCLK | _TA0_MAIN_DIV;
+ TA0EX0 = 7;
+ TA0CCR0 = 250000UL / frequency;
+ TA0CTL |= TACLR;
+ }
#endif
inline void start(unsigned char const interrupt) {