The tip strip mentions "Load a pre-generated filter and optimize ADC/DAC sample rates". I guess it's using one of the four possible filter in set_bb_rate(), but I'm a bit surprised this checkbox is not checked by default when no custom filter has been created.
This is exactly what happens after I start a Simulink model calling the AD936X receiver block...the "filter FIR configuration" is set to 'none' and 'Auto Filter' is left unchecked.In addition, the and checkboxes are not visible until I select a .ftr in the filter FIR Configuration...making it a bit confusing to understand what filter is actually in use.
Since I'm sampling at a rate < 2.083MSPS, RX FIR filter must be turned on and its decimation factor must be 4. Since I get data out of the device, I know filter is turned on, but the iio oscilloscope GUI doesn't seem to reflect this. Trying to fully understand what's going on to troubleshoot an AGC Fast Attack issue that seems to be related to an incorrect RX FIR Filter settings.
Thanks ! It answers my question. The only point that remains a bit unclear is to know if this checkbox should appear as "checked" when a default filter has been loaded behind the scene by the filter design…
There is no way for IIO-Scope to know the difference between the "Auto Filter" and a generic filter if an application like MATLAB is configuring the transceiver without IIO-Scope's knowledge. If you wanted…
Auto filter function was introduced exactly as you said to support sampling rates < 4M. It was introduced with this commit: commit/0463f20eea
If Auto Filter is enabled it will reach this line in IIO oscilloscope fmcomms2.c#L357 and actually all the "magic" is performed in ad9361_set_bb_rate function from libad9361-iio.
The table with precomputed filters seected based on baseband rate can be seen here: ad9361_baseband_auto_rate.c
Thanks ! It answers my question. The only point that remains a bit unclear is to know if this checkbox should appear as "checked" when a default filter has been loaded behind the scene by the filter design MATLAB function ?
The screenshot I attach is what I see when I open iio oscilloscope after running a Simulink model calling the AD936X RX block. Reading registers back mentions a FIR 128,4 is in use and I was expecting the Auto Filter checkbox status to be read from a register (or iio_attr) to reflect the actual status of the device.
So that, when you look at the attached screenshot, the device seems to appear as NOT having a filter loaded AND NOT using the Auto Filter. This is where the confusion comes from.
Same thing after I select a .ftr file AND the "Disable All" checkbox is checked...What are the filter setting in use when using this configuration ? (I still get data out of the device, so that decimating filters must be active !)
Does my question make sense ? Is there somethinh obvious I have missed ?
Thanks again !
There is no way for IIO-Scope to know the difference between the "Auto Filter" and a generic filter if an application like MATLAB is configuring the transceiver without IIO-Scope's knowledge. If you wanted to be sure you would have to read out the registers for the taps and compare them to those in the "Auto Filter". You are basically observing this state where a filter is loaded but IIO-Scope does not know the source since it didn't load it.
If IIO-Scope reads back a clock rate less than 2.083 MS/s the part is using a filter. The driver prevents you from operating the part without one loaded at these rates.
Thanks for your message,
I'll read coefficients back to make sure.
Since filter coefficients are indirectly addressable, I hoped I could avoid writing a routine to loop through the 128x2 (LSB-MSB) registers...
The point I was trying to clarify is the need or not, to send a "trigger" to activate the filter. The reason why I thought it could be the case is mainly because I observed the iio scope re-initialized to "Disable All" when loading a .ftr, and user has to explicitly enable RX/TX FIR Filtering from the user interface.
Thinking about it twice after reading your reply, I'm wondering what could prevent iioscope to read-back filter coefficients registers, compare with the default coefficients and automatically check the 'Auto Filter' checkbox if the 2 sets are equal ?It would allow the user interface to provide a clear and unambiguous picture of the current situation, no ?Is there something I'm missing, here ?