Using an AVR microcontroller with Zephyr to read data from an ADC via SPI
Hey guys, I'm using an AVR microcontroller with Zephyr to read data from an ADC via SPI. I've configured the SPI peripheral and device tree, but the data coming back from the ADC just doesn't seem right. So far I have been able to set up the SPI in
prj.conf
and the device tree (dts
). Wrote code to read data from the ADC. Below is the code snippet.
The code seems to be working, but the values I'm getting from the ADC are way off. Is there something wrong with my SPI configuration or how I'm reading the data? Help! @Middleware & OS0 Replies