Post Go back to editing

Problem with ADRF6821 I/Q demodulator registers

Category: Software

Hello,

I have a problem when trying to program the ADRF6821. I am using the STM32f103 to modify the registers through the SPI.
I am wondering if any one can help me with the correct register writing sequence, as it is not clear in the datasheet.

Thanks in advance,
Ahmed.

  • Hello Ahmed,

    Thanks for the question. Here is the general approach to the register sequence of ADRF6821:


    First, correct LO frequency should be obtained. This can be achieved internally or using an external LO input.
    For the internal LO generation, follow the "PLL Frequency Programming" section on the datasheet to obtain your desired LO frequency and the related register values. Note that the last write in here should be Register 0x1200. When this register is written, an internal VCO calibration initiates. To see if you can program this section correctly you can check the LOCK_DETECT pin or Register.

    For the external LO input, follow Table 14 data. Again, you can check the LOCK_DETECT pin or Register to see of you obtain the correct LO frequency.

    After the LO frequency is generated, the LO_OE bit should be enabled. This would enable the LO path. You can check if you obtain the desired frequency using the LO outputs.

    Once the LO frequency related registers are programmed, you can program RF and IF blocks for your application following the "Theory of Operation" section.

    Regards

    Gokhan

  • Hello Gokhan,
    Thank you for your detailed reply, it sounds clear now.

    but I am still a little confused about the SPI interface.
    Should I modify anything in SPI control registers first?
    The STM32f103 uses a 3.3v interface and the ADRF6821 should be compatible with 1.8v and 3.3v. but the datasheet mentioned that the default logical level used is 1.8v.

    Can I change the registers responsible for modifying the logical level from 1.8v to 3.3v through an SPI with a 3.3v logical level?

    Thanks and regards,
    Ahmed.

  • Hello Ahmed,

    ADRF6821 SPI interface is compatible with 1.8V and 3.3V. While writing registers, you can use 1.8V or 3.3V, and you should be able to write into the registers. For the readback, you should make these changes on the register map:

    Enable SPI_18_33_SEL (Register 0x0020, Bit 0) and SPI_1P8_3P3_CTRL (Register 0x1401, Bit 4) for 3.3 V compatible logic levels.

    Regards

    Gokhan

  • Thank you so much, I will try it out.

    Have a nice day.

    Regards,
    Ahmed