Skip to content

cpu/nrf5x_common: reset all available CC channels #19770

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

Merged
merged 1 commit into from
Jul 4, 2023

Conversation

dylad
Copy link
Member

@dylad dylad commented Jun 28, 2023

Contribution description

Properly reset all CC channels of a given timer at initialization (except the last one which seems to be used for capture only in the driver).
The issue with the previous code was that some CCs were not clear on some nRF52 MCUs.
For instance, nRF52840 has 4 CCs for its two first timers, then 6 CCs for all others.
nRF9160 and nRF5340 also have 6 CCs for all its timer peripherals.
Thus, loop through the reported number of channels and clear the associated register instead of hardcoding the first 3 CC channels.

Testing procedure

CI should be enough I think.

Issues/PRs references

None.

Except the last channel used for capture

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
@github-actions github-actions bot added Platform: ARM Platform: This PR/issue effects ARM-based platforms Area: cpu Area: CPU/MCU ports labels Jun 28, 2023
@dylad dylad added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 28, 2023
@riot-ci
Copy link

riot-ci commented Jun 28, 2023

Murdock results

✔️ PASSED

a73ddbd cpu/nrf5x_common: reset all available CC channels

Success Failures Total Runtime
6929 0 6930 11m:21s

Artifacts

@maribu
Copy link
Member

maribu commented Jul 4, 2023

bors merge

@bors bors bot merged commit 852e9c5 into RIOT-OS:master Jul 4, 2023
@bors
Copy link
Contributor

bors bot commented Jul 4, 2023

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.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@dylad
Copy link
Member Author

dylad commented Jul 4, 2023

Thanks !

@dylad dylad deleted the cpu/nrf5x_common/reset_all_cc_channels branch July 4, 2023 15:25
@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants