Post Go back to editing

Reduce frequency change time (ADRV9008-1)

Hi,

I'm using ADRV9008-1 + my custom board.

I developed an application using a IIO driver to change the LO frequency of ADRV9008-1.

Refer to the iio_attr program.(https://github.com/analogdevicesinc/libiio/blob/master/tests/iio_attr.c)

Since the frequency change time is important, the execution time was measured with the clock_get time function. a code is below.

-----

clock_gettime(CLOCK_MONOTONIC, &t_begin);
sprintf(sCenterFreq, "%llu", center_freq);
if(iio_channel_attr_write(ch, attr, sCenterFreq) < 0){
DebugLog((SLOG_ERROR, "* Error : Can't write frequency attribute\n"));
shutdown_iio();
return TFAIL;
}
clock_gettime(CLOCK_MONOTONIC, &t_end);
t_result = 1000000000 * (t_end.tv_sec - t_begin.tv_sec) + (t_end.tv_nsec - t_begin.tv_nsec);
printf("iio_channel_attr_write : %lf sec\n", (double)t_result / 1000000000);

------

As a result, the change time was 100ms.This time is too long.

Is there any way to reduce this time as much as possible?

thanks.



add thanks.
[edited by: JehoLee at 11:36 AM (GMT -4) on 16 Sep 2021]

Top Replies

Parents Reply Children
No Data