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

FRDM_K82F DTS missing information for ADC-0 #25468

Closed
paulvohs opened this issue May 20, 2020 · 2 comments · Fixed by #25502
Closed

FRDM_K82F DTS missing information for ADC-0 #25468

paulvohs opened this issue May 20, 2020 · 2 comments · Fixed by #25502
Assignees
Labels
area: ADC Analog-to-Digital Converter (ADC) bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug

Comments

@paulvohs
Copy link

paulvohs commented May 20, 2020

To my understanding, in order to enable a CPU feature that is disabled by default, an entry of the form
&feature {
status="okay"
};
must be added into the board DTS. I added this to enable ADC functionality to the FRDM_K82F DTS and it failed to compile.

A coworker of mine figured out that there is a missing
#io-channel-cells = <1>;
in the file zephyr/dts/arm/nxp/nxp_k8x.dtsi. I am not sure if this is a bug or intended behavior.

Steps to reproduce the behavior:

  1. Add the following to zephyr/boards/arm/frdm_k82f/frdm_k82f.dts:
    &adc0 {
    status = "okay";
    };
  2. Build any sample project with -b frdm_k82f.
  3. See attached screenshot of error output.
    Screen Shot 2020-05-19 at 5 36 56 PM

I believe this is something that needed to be included in the FRDM_K82F DTS but was not, though I am unsure.

This is an important issue for anyone planning to utilize the ADC on the Freedom K82F board.

  • OS is Ubuntu 18.04.4 VM running on Mac OS X
  • Toolchain is Zephyr with Ninja
  • Commit SHA is ed2d263
@paulvohs paulvohs added the bug The issue is a bug, or the PR is fixing a bug label May 20, 2020
@carlescufi
Copy link
Member

@paulvohs enabling a feature is done through a combination of Devicetree and Kconfig. The particular error you are getting doesn't ring a bell but I am sure that @MaureenHelm or @galak will be able to point you to the right direction.

@MaureenHelm MaureenHelm added area: ADC Analog-to-Digital Converter (ADC) platform: NXP NXP priority: low Low impact/importance bug labels May 20, 2020
@MaureenHelm
Copy link
Member

Yes, this is a bug in the soc device tree. The dts fix is easy, but I'd like to also enable tests/drivers/adc/adc_api for this board while we're here. I can work up a PR, but I don't have access to the hardware right now so I'll need your help to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ADC Analog-to-Digital Converter (ADC) bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants