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

kinetis: Allow per-board config of ADC ref #8560

Merged
merged 1 commit into from
Feb 16, 2018

Conversation

jnohlgard
Copy link
Member

Contribution description

ADC reference can be external pin or internal VREF module on most Kinetis CPUs. The CPU reference manual has a description of the valid values for each CPU, but I have added a short summary of the options in each of the existing periph_conf.h headers for reference.
This was previously hard-coded to always use reference setting 0, but for the FRDM-KW41Z board we need to use setting 1 to get valid ADC readings without always having VREF enabled (which would increase power consumption)

Issues/PRs references

Required by #6995

ADC reference can be external pin or internal VREF module on most
Kinetis CPUs.
@jnohlgard jnohlgard added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Platform: ARM Platform: This PR/issue effects ARM-based platforms CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 14, 2018
@jnohlgard jnohlgard added this to the Release 2018.04 milestone Feb 14, 2018
Copy link
Member

@smlng smlng left a comment

Choose a reason for hiding this comment

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

ACK, no (big) magic happening here, still successfully tested ADC with pba-01-kw2x -> works.

We might consider to put allowed values into to the respective cpu.conf and set a reasonable default per board, thereby omitting the magic 0 and duplicated documentation above here.

@smlng smlng merged commit 966d83d into RIOT-OS:master Feb 16, 2018
@jnohlgard jnohlgard deleted the pr/kinetis-adc-ref branch February 16, 2018 14:10
@jnohlgard
Copy link
Member Author

Thank you @smlng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants