Hi John,
Thanks for the answer, I did use u-boot overlays and setup the uEnv.txt to load the right overlay. BTW, I am rebooting the BeagleBone every-time I want to load a new overlay, can you confirm that it’s the only way to do it ?
I’ll try to use the IIO Oscilloscope, however as I have access to a “real” oscilloscope so I am not sure to understand how it can help me…
Finally, I think I’ve found my mistake this weekend. The input voltage was to low (i’ve built a tension divider bridge between the generator and the input of the ADC…)so basically I was measuring noises. However, do you know if there is an auto-scale on the iio driver, indeed the “noises” where scaled to the entire range of the ADC.
TJF,
Thanks for the help,I tried to use libiio but i was not successful when it came to read the data, i was read (nil) instead of my data (I am adding the code I was using at the end of this message). That is why I change and used the iio_generic_buffer.c example. BTW, is libpruio working with the latest kernels, remoteproc and rpmsg?
`
#define _GNU_SOURCE
#define _DEFAULT_SOURCE
#include <cdk/cdk.h>
#include <locale.h>
#include <pthread.h>
#include <stdbool.h>
#include <unistd.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#ifdef APPLE
#include <iio/iio.h>
#else
#include <iio.h>
#endif
struct iio_context *ctx;
struct iio_device *dev;
struct iio_channel *ch;
int main()
{
ctx = iio_create_default_context();
dev = iio_context_get_device(ctx, 0);
ch = iio_device_get_channel(dev, 3);
iio_device_attr_write_
longlong(dev, “sample_rate”, 100);
iio_channel_attr_write_double(ch, “scale”, 1);
iio_channel_enable(ch);
char *a = iio_device_get_data(dev);
printf("%p\n", a);
iio_channel_disable(ch);
return 0;
}
`