diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-11-30 15:56:14 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-11-30 15:56:14 +0100 |
commit | 45c8997e49650fc86c4323304d67ca87c7ad1e64 (patch) | |
tree | 1907fcd89d69a95572777bca9f2c65cac1091ed7 /src/arch/msp430fr5994lp/driver/stdout.cc | |
parent | bebc6a4be12c5a323140ed36d4d671b9a287d761 (diff) |
msp430fr5994: add experimental support for 32kHz operation via LFXT
Diffstat (limited to 'src/arch/msp430fr5994lp/driver/stdout.cc')
-rw-r--r-- | src/arch/msp430fr5994lp/driver/stdout.cc | 6 |
1 files changed, 6 insertions, 0 deletions
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 |