We use the IIO driver to setup AD9361 on E310 to work in TDD 1rx-1tx mode. Since we are still in exploring phase, so we are still using SPI to choose between TX and RX state. It seems to be working.According to https://wiki.analog.com/resources/tools-software/linux-drivers/iio-transceiver/ad9361, the IIO driver supports direct transition from TX to RX or vice versa without the need to spell out the intermediate "alert " state.
Next, we hope to skip the VCO calibration since our application has a very tighten window for that. Therefore, we also enabled "adi,tdd-skip-vco-cal-enable". However, after this configuration, we could no longer enable the tx mode. It is still possible to switch to rx mode, but whenever we try to write "tx" into the channel attribute 'ensm_mode', it stuck at the alert mode. See the following.
root@usrp-e310-linux:/sys/kernel/debug/iio/iio:device0# cat adi,frequency-division-duplex-mode-enable
root@usrp-e310-linux:/sys/kernel/debug/iio/iio:device0# cat adi,tdd-skip-vco-cal-enable
root@usrp-e310-linux:/sys/bus/iio/devices/iio:device0# echo rx > ensm_mode
root@usrp-e310-linux:/sys/bus/iio/devices/iio:device0# cat ensm_mode
root@usrp-e310-linux:/sys/bus/iio/devices/iio:device0# echo tx > ensm_mode
(Question 1) What steps or issues did we miss to cause the above issue with adi,tdd-skip-vco-cal-enable is set?
(Question 2) Related with the first question, was the debug attribute adi,tdd-use-fdd-vco-tables-enable eliminated? If so, is it automatically chosen when TDD VCO calibration is disabled?
The attribute adi,tdd-use-fdd-vco-tables-enable is on page https://wiki.analog.com/resources/tools-software/linux-drivers/iio-transceiver/ad9361-customization, but we couldn't find it in the device tree in :/sys/kernel/debug/iio/iio:device0, see the following.
root@usrp-e310-linux:/sys/kernel/debug/iio/iio:device0# ls adi,tdd*
Please see this commit:
drivers/iio/adc/ad9361: New v3 Synthesizer VCO Tables
New Version 3 tables optimize lock…
We need a couple more things to know before moving on:
- version of kernel
- device tree node with all selected properties of ad9361
- firstly remove comments "//" from drivers/iio/adc/ad9361.c lines 8,9 to enable driver debugging, compile, run your commands and post the "dmesg" output
Hi, thanks for the suggestions. It might take a bit more time for us to get all the info list above. On the other hand, I think we have identified the issue regarding Question 1 above. In fact, during TDD mode, before adjusting TX LO, AD9361 should first enter the TDD TX mode. What happened was that we were trying to change the TX LO while the chip is in TDD RX mode. Now, we can change both TX and RX LO frequencies without problem.
Can you respond to Question 2 above? Thanks.
New Version 3 tables optimize lock at temperature, lock over temperature,
and VCO pulling for the TDD case.
Temperature compensation was added to TDD tables as well.
This results in following changes:
TDD use dual Synthesizer mode – used FDD tables -> now uses TDD tables.
TDD skip VCO cal mode – used FDD tables -> now uses TDD tables.
TDD use FDD tables option -> removed.
FDD independent mode - used FDD tables -> now uses TDD tables.
FDD mode, in case RX LO == TX LO will use TDD tables.