Skip to content

Commit

Permalink
Merge pull request #20623 from maribu/cpu/msp430/periph_usci/fix-pres…
Browse files Browse the repository at this point in the history
…caler

cpu/msp430/perriph_usci: fix prescaler values for ACLK
  • Loading branch information
benpicco authored Apr 26, 2024
2 parents 925644e + 4c0d6f8 commit 70c70e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpu/msp430/periph/usci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 70c70e2

Please sign in to comment.