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

nrf52: dont write to read only register #1874

Merged
merged 1 commit into from May 22, 2020

Conversation

hudson-ayers
Copy link
Contributor

Pull Request Overview

While trying to debug what is wrong with the nrf52 15.4 driver, I realized that the nrf52 clock code attempts to write to a register that both the nrf52840 and nrf52832 datasheets define as a read only register (page 107: https://infocenter.nordicsemi.com/pdf/nRF52832_PS_v1.4.pdf , https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fclock.html&cp=4_0_0_4_3_2_16&anchor=register.HFCLKSTAT) .

This PR removes this incorrect code. Despite this function call not working, the code was actually functionally correct, because the subsequent line that starts the high speed clock has a side effect of setting the HighClockSource to XTAL anyway (per https://infocenter.nordicsemi.com/topic/ps_nrf52840/clock.html?cp=4_0_0_4_3_2_0#register.TASKS_HFCLKSTART).

Testing Strategy

Flashing the 15.4 radio_tx app on an nrf52840. It works the same as before this change.

TODO or Help Wanted

N/A.

Documentation Updated

  • No updates are required.

Formatting

  • Ran make format.
  • Fixed errors surfaced by make clippy.

@hudson-ayers hudson-ayers added nrf Change pertains to the nRF5x family of MCUs. P-Upkeep This a relatively minor change, or one that is limited in scope, and requires less scrutiny. labels May 21, 2020
Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors bors bot merged commit b9804f3 into tock:master May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nrf Change pertains to the nRF5x family of MCUs. P-Upkeep This a relatively minor change, or one that is limited in scope, and requires less scrutiny.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants