Post Go back to editing

AD7124 pyadi-iio rx() function is constant

Category: Software
Product Number: AD7124-8
Software Version: Kuiper linux 2022_R2, pyadi-iio 0.0.16

Kuiper linux downloaded from here (2022_r2) swdownloads.analog.com/.../image_2023-12-13-ADI-Kuiper-full.zip and use it on Raspberry Pi Model B.

I am using eval-ad7124-8sdz board using SPI connection following wiki.analog.com/.../precision_adc_toolbox.

Strangely under /boot/overlays, it only has rpi-ad7124-8-all-diff.dtbo, and does not have rpi-ad7124-8-all-diff-cs0-int25-overlay.dtbo. So in order to use the interruption line GPIO 25, I downloaded https://github.com/analogdevicesinc/linux/blob/rpi-5.4.y/arch/arm/boot/dts/overlays/rpi-ad7124-8-all-diff-cs0-int25-overlay.dts

and compiled using 

sudo bash -c 'dtc -I dts -O dtb /home/analog/Downloads/rpi-ad7124-8-all-diff-cs0-int25-overlay.dts > /boot/overlays/rpi-ad7124-8-all-diff-cs0-int25-overlay.dtbo'

When I run https://github.com/mthoren-adi/precision_adc_toolbox/blob/master/ad7124_simple_capture.py, the data returned by rx() is a constant array, instead of a sin function that I used as input.

When I tune the input to a constant DC voltage, rx() indeed returns (roughly) that voltage, repeated 1024 times (as rx_buffer_size = 1024). Therefore I believe the rx() function is only reading once, instead of continuously reading 1024 times. 

Since the Kuiper linux does not contain rpi-ad7124-8-all-diff-cs0-int25-overlay.dtbo and I have to recompile it from scratch, my guess is the Kuiper linux that I am using is incorrect. Could you confirm what is the correct Kuiper linux download link that contains the correct code for ad7124-8, and also why rx() is returning a constant instead of a continuous read?

Thread Notes

Parents Reply Children
No Data