Skip to content

Fix SAADC resolution for nRF52-based targets #10939

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 2 commits into from
Jul 3, 2019

Conversation

AGlass0fMilk
Copy link
Member

@AGlass0fMilk AGlass0fMilk commented Jul 1, 2019

Resolution set in sdk_config for both nRF52840 and nRF52832 was set to 10 bits. The HAL implementation of analogin_read_u16 assumes 12-bit range during scaling to Mbed's 16-bit resolution standard. This caused incorrect readings to be returned.

https://github.com/ARMmbed/mbed-os/blob/1cecfa480ff14483eeffb1a461c1d2578c3e9a4a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/analogin_api.c#L129-L131#

Pull request type

[X] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

…bit range but config was set to 10 bit range causing incorrect readings to be returned.
@ciarmcom ciarmcom requested a review from a team July 1, 2019 17:00
@ciarmcom
Copy link
Member

ciarmcom commented Jul 1, 2019

@AGlass0fMilk, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 2, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jul 2, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@OPpuolitaival
Copy link
Contributor

Started CI because testing one CI change

@mbed-ci
Copy link

mbed-ci commented Jul 3, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants