In this series:
In part 1 of this blog series, we listed the registers that can be used to change the LMS6002D PLL’s transmit and receive frequency to 433 MHz. The Nutaq software includes functions that configure the registers automatically.
The following Command Line Interpreter (CLI) function configures the LMS6002D PLL frequency:
PLL frequency configuration can also be performed with the following C code functions:
fmc_radio_lime_calculate(); then fmc_radio_lime_setpllparam_send();
These functions, however, require an external computer to be connected to the PicoSDR via an Ethernet or PCIe connection. So, for a cognitive application based on energy detection, feedback from the mean noise power calculator would need to be sent to the external computer if a switch in frequency is required, which adds latency to the algorithm. In many cognitive radio applications, latency must be managed carefully as the radio needs to be opportunistic. So, depending on the number of frequencies that need to be scanned and the silence period of the primary users (PUs), latency can be crucial to the correct operation of your cognitive radio.
Configuring the PLLs directly from the FPGA is the most efficient way to minimize latency. This can be easily done by using Nutaq’s Model-based Design Kit (MBDK). The following blocks can be used to send SPI commands to the LMS6002D chips:
An interesting fact: In MIMO mode where you have two FGPA mezzanine card (FMC) radios (or two LMS6002D chips) to configure, you can control both in parallel at the same time, thanks to the parallel architecture.
The blocks have four ports (2 inputs, 2 outputs):
• lime_data: The 16-bit SPI data to send to the LMS6002D chip
• lime_data_start: The lime_data valid signal. A “1” means that lime_data will be sent to the LMS6002D chip.
• fpga_ext_control: The output port indicating if control from the FPGA is enabled. A “1” indicates that the FMC radio is controlled by the FPGA.
• lime_data_busy: The output port indicating if the LMS6002D is busy processing an SPI command. A “1” indicates that the chip is busy.
Let’s take a look at how to send an SPI command to the chip. From the LMS6002D Programming and Calibration Guide, page 2:
Basically, this figure tells us that lime_data, a 16-bit sample, is the concatenation of 1: