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

boards/samd5x: GCLK source for ADC must not exceed 100 MHz #20932

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented Oct 22, 2024

Contribution description

When not otherwise specified, the ADC will be clocked by GCLK_MAIN which in case of SAM D5x/E5x is configured to run at 120 MHz.

This exceeds the maximum allowed input GCLK frequency.

image

We could use DIV4 here as well, but as long as we don't have the sample length calculation in, better run the ADC at a more conservative pace.

Testing procedure

tests/periph/adc still works

2024-10-22 13:24:57,458 # main(): This is RIOT! (Version: 2024.10-devel-340-gdf7e3-boards/samd5x-adc_freq)
2024-10-22 13:24:57,458 # 
2024-10-22 13:24:57,461 # RIOT ADC peripheral driver test
2024-10-22 13:24:57,461 # 
2024-10-22 13:24:57,467 # This test will sample all available ADC lines once every 100ms with
2024-10-22 13:24:57,472 # a 10-bit resolution and print the sampled results to STDIO
2024-10-22 13:24:57,472 # 
2024-10-22 13:24:57,473 # 
2024-10-22 13:24:57,475 # Successfully initialized ADC_LINE(0)
2024-10-22 13:24:57,478 # Successfully initialized ADC_LINE(1)
2024-10-22 13:24:57,482 # Successfully initialized ADC_LINE(2)
2024-10-22 13:24:57,483 # ADC_LINE(0): 209
2024-10-22 13:24:57,485 # ADC_LINE(1): 215
2024-10-22 13:24:57,486 # ADC_LINE(2): 211
2024-10-22 13:24:57,588 # ADC_LINE(0): 194
2024-10-22 13:24:57,589 # ADC_LINE(1): 133
2024-10-22 13:24:57,591 # ADC_LINE(2): 204

Issues/PRs references

@github-actions github-actions bot added the Area: boards Area: Board ports label Oct 22, 2024
@benpicco benpicco changed the title boards: GCLK source for ADC must not exceed 100 MHz boards/samd5x: GCLK source for ADC must not exceed 100 MHz Oct 22, 2024
@benpicco benpicco added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 22, 2024
@benpicco benpicco requested review from maribu and dylad October 22, 2024 11:26
@riot-ci
Copy link

riot-ci commented Oct 22, 2024

Murdock results

✔️ PASSED

419fc6e boards/samd5x: GCLK source for ADC must not exceed 100 MHz

Success Failures Total Runtime
2251 0 2251 06m:43s

Artifacts

Copy link
Member

@dylad dylad left a comment

Choose a reason for hiding this comment

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

LGTM.
doccheck is complaining. Feels free to squash right away.

@benpicco benpicco added this pull request to the merge queue Oct 22, 2024
Merged via the queue into RIOT-OS:master with commit 9187145 Oct 22, 2024
25 checks passed
@benpicco benpicco deleted the boards/samd5x-adc_freq branch October 22, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants