-
Notifications
You must be signed in to change notification settings - Fork 2k
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
boards/z1: fix broken clock configuration #19705
Conversation
@kaspar030 tested this PR, see https://gitea.riot-labs.de/kaspar/results/src/branch/main/pr19705 The takeaway is:
|
I changed my mind regarding skipping the most significant RSEL bit in the calibration when an external resistor is used in the DCO: Just doing the normal calibration anyway reduces code complexity and size and only adds a minor delay in boot up time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good and @kaspar030 confirmed it's still working
The MSP430F2xx family has on RSEL bit more than the MSP430x1xxx family. This updates the clock calibration accordingly.
df5c319 from RIOT-OS#19558 broke the clock configuration of the Z1 by relying on the incorrect documentation of what clock is actually used. Closely reading the convoluted clock initialization code revealed that no XT2 crystal is present (as also indicated by some comments in `board.c`), contradicting the `#define MSP430_HAS_EXTERNAL_CRYSTAL 1` in the `board.h`. This now should restore behavior (but with calibrated DCO than hard coded magic numbers).
b619dde
to
971dc88
Compare
bors merge |
19705: boards/z1: fix broken clock configuration r=maribu a=maribu ### Contribution description The MSP430F2xx family has on RSEL bit more than the MSP430x1xxx family. The first commit updates the clock calibration accordingly. df5c319 from #19558 broke the clock configuration of the Z1 by relying on the incorrect documentation of what clock is actually used. Closely reading the convoluted clock initialization code revealed that no XT2 crystal is present (as also indicated by some comments in `board.c`), contradicting the `#define MSP430_HAS_EXTERNAL_CRYSTAL 1` in the `board.h`. The second commit should restore behavior (but with calibrated DCO than hard coded magic numbers). 19713: nanocoap: clean up coap_iterate_option(), make it public r=maribu a=benpicco Co-authored-by: Marian Buschsieweke <[email protected]> Co-authored-by: Benjamin Valentin <[email protected]>
Build failed (retrying...): |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Thx :) |
Contribution description
The MSP430F2xx family has on RSEL bit more than the MSP430x1xxx family. The first commit updates the clock calibration accordingly.
df5c319 from #19558 broke the clock configuration of the Z1 by relying on the incorrect documentation of what clock is actually used. Closely reading the convoluted clock initialization code revealed that no XT2 crystal is present (as also indicated by some comments in
board.c
), contradicting the#define MSP430_HAS_EXTERNAL_CRYSTAL 1
in theboard.h
.The second commit should restore behavior (but with calibrated DCO than hard coded magic numbers).
Testing procedure
make BOARD=z1 -C examples/default flash term
should work again, but fail with
master
.Issues/PRs references
Regression introduced in #19558