1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #20623 from maribu/cpu/msp430/periph_usci/fix-prescaler

cpu/msp430/perriph_usci: fix prescaler values for ACLK
This commit is contained in:
benpicco 2024-04-26 09:42:25 +00:00 committed by GitHub
commit 70c70e2afc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -162,19 +162,19 @@ msp430_usci_prescaler_t msp430_usci_prescale(uint32_t target_hz)
* be needed. Otherwise the estimation will be good enough.
*/
switch (target_hz) {
case 9600:
case 1200:
result.mctl = 2U << UCBRS_Pos;
result.br0 = 27;
return result;
case 4800:
case 2400:
result.mctl = 6U << UCBRS_Pos;
result.br0 = 13;
return result;
case 2400:
case 4800:
result.mctl = 7U << UCBRS_Pos;
result.br0 = 6;
return result;
case 1200:
case 9600:
result.mctl = 3U << UCBRS_Pos;
result.br0 = 3;
return result;