Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/msp430/perriph_usci: fix prescaler values for ACLK #20623

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cpu/msp430/periph/usci.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "irq.h"

Check warning on line 1 in cpu/msp430/periph/usci.c

View workflow job for this annotation

GitHub Actions / static-tests

no copyright notice found
#include "macros/math.h"
#include "mutex.h"
#include "periph_conf.h"
Expand Down Expand Up @@ -162,19 +162,19 @@
* 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
Loading