-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
ADC1 doesn't read correctly on STM32F7 #29309
Comments
Okay I think I know what the issue is; the pinmux definitions for the STM32 Nucleo boards only map PA0 to ADC1. None of the other pins that are supported by the ADCs are mapped. If I connect an analog device to PA0 of my Nucleo F767ZI board and use channel 0, I get correct ADC readings. I'll see if I can open up a PR soon to fix this, at least for the F767ZI! |
Nevermind! I don't think any changes are required -- I just needed to create a devicetree overlay file and override the
which adds |
@disposedtrolley As I understand, everything work fine then ? |
Yep all good @erwango Do you think it's worthwhile to document the pinmuxing somewhere? Would there be a suitable section in the docs to cover this? |
@disposedtrolley This is indeed required. My view is that it should belong to upcoming DT bindings doc section: #29374 |
@disposedtrolley Txs for feedback. Feel free to close this point if we're done. |
Describe the bug
The ADC_1 peripheral doesn't seem to work correctly on the STM32F7 series. I've tried compiling a test project following the test code supplied in the PR which introduced ADC support for STM32, but I get garbage readings on my Nucleo F767ZI board. The same code works fine on my Nucleo F401RE.
My settings:
To Reproduce
Steps to reproduce the behavior:
adc_channel_setup()
.Expected behavior
The ADC should output similar readings on the F7 series as the F4.
Impact
It was painful to debug whether this was an issue with my code, a hardware problem, or a Zephyr issue. Since the ADC implementation was only tested on some F4 boards, perhaps compatibility with other STM32 series should be removed from the docs.
Logs and console output
If applicable, add console logs or other types of debug information
e.g Wireshark capture or Logic analyzer capture (upload in zip archive).
copy-and-paste text and put a code fence (```) before and after, to help
explain the issue. (if unable to obtain text log, add a screenshot)
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: