Marvee Amasi
Marvee Amasi
DIIDevHeads IoT Integration Server
Created by Dtynin on 9/13/2024 in #middleware-and-os
Troubleshooting ADC Configuration for Sensor Data Acquisition on AVR128DA48 with Zephyr OS
Do you have the correct ADC device name, we make mistakes like this attimes . In the Zephyr OS, the ADC device names may vary depending on the hardware you're using. Instead of "ADC_0", check your board’s device tree for the correct device name. Print out the available devices with:
const struct device *adc_dev = device_get_binding(DT_LABEL(DT_NODELABEL(adc0)));
if (!adc_dev) {
printk("Failed to bind to ADC_0 device\n");
}
const struct device *adc_dev = device_get_binding(DT_LABEL(DT_NODELABEL(adc0)));
if (!adc_dev) {
printk("Failed to bind to ADC_0 device\n");
}
Just make sure you reference the correct node label for your device
4 replies