Disable AGC and DC removal in LimeSuiteNG

Hello Everyone, I hope you’re all doing well!

I’m in the process of migrating from LimeSuite to LimeSuiteNG.

In my project, I need that a device doesn’t perform AGC and DC removal, so I disabled this functionality explicitly using the MCU_AGCStop and SetRxDCRemoval functions correspondently.

As I can see the new API of the LimeSuiteNG doesn’t have the mentioned functions.

So could you please clarify:

  • does LimeSuiteNG provide API to manage AGC and DC removal?
  • is AGC or DC removal disabled by default in LimeSuiteNG?

Thank you in advance!

Hi, LimeSuiteNG does not have MCU_AGC functionality, so it does not need to be disabled.
The Rx does have a digital DC correction enabled by default. At this moment it’s not exposed in the API, but you can disable it directly by modifying register value:
sdrdevice->SetParameter(0, channelIndex, "DC_BYP_RXTSP", 1)

Hi @ricardas ,

Thank you so much for the answer!

Best Regards,
Sergii.

Hi @ricardas ,

Sorry for returning to this thread!

I have been checking the new API for some time and I realized that the new API actually has a function for managing DC cancellation:

src/include/limesuiteng/SDRDevice.h

/// @brief Enables or disables the DC corrector bypass.
/// @param moduleIndex The device index to configure.
/// @param trx The direction to configure.
/// @param channel The channel to configure.
/// @param isAutomatic Whether to use the DC corrector bypass or not (false = bypass the corrector, true = use the corrector)
/// @return The status of the operation.
virtual OpStatus SetDCOffsetMode(uint8_t moduleIndex, TRXDir trx, uint8_t channel, bool isAutomatic) = 0;

I’ve checked the implementation of this function in the src/boards/LMS7002M_SDRDevice.cpp and it looks to me that it performs the same as you suggested (write the DC_BYP_RXTSP parameter).

By the way, in my opinion, the implementation contains a misuse of one function parameter:

src/boards/LMS7002M_SDRDevice.cpp

OpStatus LMS7002M_SDRDevice::SetDCOffsetMode(uint8_t moduleIndex, TRXDir trx, uint8_t channel, bool isAutomatic)
...
    return lms->Modify_SPI_Reg_bits(LMS7002MCSR::DC_BYP_RXTSP, isAutomatic == 0, channel);

I suspect the last parameter (channel) in the Modify_SPI_Reg_bits function call is misused (because the function expects the binary flag, but not the channel number).

Could you please confirm if my understanding is correct and the SetDCOffsetMode function can be used to manage the DC cancellation?

Best Regards.

You’re right, the function parameter is misused, but it will not create problems, it’s just a cache use flag.

I suppose you could use it. But there are two Rx DC correctors available, analog, and digital. I need to review this API if it won’t create ambiguity problems in the future, as it was added just as part of legacy API wrapper.