Why Is My AVR32UC ADC Returning Zero Despite a Correct Input Signal?
Hey everyone, I'm currently working on reading an analog value using the ADC on my AVR32UC microcontroller, but I'm running into a problem where the ADC consistently returns zero, even though the input signal is correct. I've verified that the ADC driver is enabled in the
prj.conf
file, and also ensured that the ADC channel being used corresponds to the correct pin on the microcontroller.
Here's the code I'm using:
The issue I’m facing:
Despite these efforts, the ADC still returns zero consistently. Does anyone have suggestions on what might be causing this, or how I can troubleshoot further?Solution:Jump to solution
@Dtynin It seems like your ADC isn't working because the binding for the ADC device isn't found, and your ADC configuration might be incomplete. Check your device binding and sequence configuration
2 Replies
Solution
@Dtynin It seems like your ADC isn't working because the binding for the ADC device isn't found, and your ADC configuration might be incomplete. Check your device binding and sequence configuration
Hey @Enthernet Code , you were right. I checked the ADC device name in the device tree and found a mismatch. Fixing that sorted out the binding issue. I also tweaked the
adc_sequence
configuration, and now the ADC is reading values correctly. Thanks a ton