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
ADC sometimes returns 0? #180
Comments
I don't think I've seen that, but I'm not sure. I'm using the ADC as part of a non-trivial test stand. I've seen the ADC value reported as 0 quite often, but that always happened while something else was going wrong. In particular, there's a second dev board involved in the testing, which sets a GPIO signal on the ADC pin. When the firmware on that board crashes, the signal is stuck at LOW, causing the ADC on the main dev board to always report 0. So I don't think I've seen that issue. I've definitely never seen any weird ADC problems in isolation, without other failures that would explain them. |
Thanks, for the info! |
I went through a bunch of STM32L4xx MCU's errata sheets and all state this error. |
I have been digging even more, what I have found is that whenever a system just get 0 from the ADC the ADC still reads 1 for Any ideas on this @hannobraun ? I'm quite at a loss here. |
Hi,
I am testing the newly merged ADC driver, and I pushed the update out on our system to give it a try.
I have the strange issue that some read the correct ADC value, and some always read 0 from the ADC (note: same firmware running on all).
Ping @hannobraun, have you seen something like this during your developments and what may have been the cause?
The only thing that I can think of is that the ADC calibration did not complete successfully. Could the 20us delay be too small due to clock errors (i.e. bad crystal or HSI derived clock)?
I have also checked the driver with the reference manual again, but to no avail. All seems correct.
Edit: This is being tested on an STM32L412.
The text was updated successfully, but these errors were encountered: