We work with our custom board with AD9364 + TMS320C6748 DSP for 2 years but we have had strange problems with boards manufactured this year:
We use NO_OS driver and ad9361_rfpll_set_rate() failed with calibration timeout. So I check its internal function ad9361_rfpll_vco_init() and noticed that during this SPI write:
ad9361_spi_writef(spi, REG_RX_CP_CURRENT + offs, CHARGE_PUMP_CURRENT(~0),
REG_RX_CP_CURRENT register reading give 0xC0 which means that Test Mode bit VCO Tune bit is set!
I've checked all instances of REG_RX_CP_CURRENT writing. Function ad9361_txrx_synth_cp_calib(phy, ref_freq, false) writes 0x80 to these register, so i don't understand why REG_RX_CP_CURRENT register reading give 0xC0...
I tested this register by write/read sequence: "write 0x80, read, write 0x80, read,..." and each read operation give diffrerent results: 0xC0, OXD0, 0xF0...
REG_TX_CP_CURRENT writing/reading give same bad result....
I checked all other register in a same manner - all good.
I think ad9361_rfpll_set_rate() calibration timeout is consequence of such strange behaviour of REG_R(T)X_CP_CURRENT.