From 45c8997e49650fc86c4323304d67ca87c7ad1e64 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 30 Nov 2020 15:56:14 +0100 Subject: msp430fr5994: add experimental support for 32kHz operation via LFXT --- src/arch/msp430fr5994lp/driver/stdout.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/arch/msp430fr5994lp/driver/stdout.cc') diff --git a/src/arch/msp430fr5994lp/driver/stdout.cc b/src/arch/msp430fr5994lp/driver/stdout.cc index b3e8b4d..f3c219a 100644 --- a/src/arch/msp430fr5994lp/driver/stdout.cc +++ b/src/arch/msp430fr5994lp/driver/stdout.cc @@ -32,6 +32,12 @@ void StandardOutput::setup() UCA0CTLW0 = UCSWRST | UCSSEL__SMCLK; UCA0MCTLW = 0x5500; UCA0BR0 = 8; +#elif F_CPU == 32768UL + // Limited to 9600 Baud + // 32768 / 9600 == 3.413333 -> UCOS16 = 0, UCBR0 = 3, UCBRF0 = 0, UCBRS0 = 0x92 ("0.4003") + UCA0CTLW0 = UCSWRST | UCSSEL__SMCLK; + UCA0MCTLW = 0x9200; + UCA0BR0 = 3; #else #error Unsupported F_CPU #endif -- cgit v1.2.3