Post Go back to editing

iio_channel_disable does not clear the enable bit

Category: Software

Calling iio_channel_enable/disable should set bit 0 value of register 0x400,0x440,0x480 and 0x4C0 of ADC_Channel (axi_ad*).

This working when we call iio_device_create_buffer.

However, trying to call iio_channel_disable prior to iio_buffer_destroy is not reflecting the bit 0 clear.

Therefore, as enable is still 1, rx data are still being sent to fpga component adc_cpack which reflect overflow (fifo_wr_overflow) , which should not be the case.

The only method I found is to clear this by setting the register by hand . 

devmem 0x79020400 32 0x250
devmem 0x79020440 32 0x250
devmem 0x79020480 32 0x250
devmem 0x790204C0 32 0x250

Is there a cleaner method to do this with iio ?

Thanks