Frequency hopping transmit [FIXED]

My mistake. It is indeed working well, thanks a lot!

For anyone interested I do something like this

// Use high level function to sets things right.
device->SetNCOFreq(tx, channel, index, freq);
...

lime::LMS7002M* lms = device->GetLMS();
uint16_t addr = tx ? 0x0240 : 0x0440;

// Use low level functions to directly set the NCO.
uint32_t fcw = uint32_t((otherFreq/ refClk_Hz) * 4294967296);
lms->SPI_write(addr + 2 + index * 2, (fcw>> 16)); // NCO MSB part.
lms->SPI_write(addr + 3 + index * 2, fcw); //NCO LSB part.

This allows skipping a lot of costly calls that in my case, going from 4.4ms to 0.350ms. That’s an awesome improvement!

I’m only using channel 0, but I would probably need to call something like lms->Modify_SPI_Reg_bits(LMS7param(MAC), channel); if I wanted to go from one channel to another.