Post Go back to editing

ADRV9026 Bug: internal TX LO leakage init cal fails in about half of the runs and reports success. Fix: Host-side check and workaround

Contains AI Generated Content
Category: Software
Product Number: ADRV9026
Software Version: ADRV9026 (silicon 0xB0), API 7.0.0.14 / ARM firmware 7.0.0.11 (SW 7.0.0.15)

Problem

After calling adi_adrv9025_InitCalsRun() with ADI_ADRV9025_TX_LO_LEAKAGE_INTERNAL (0x400), about half of the channel runs leave the LO line at -10 to -20 dBm (TX attenuation 10 dB) instead of below -65 dBm. The success / failure of these init cals runs are independent of each other and also independent of the channel. No matter if there is a high LO leakage or not, the API always reports success even though this failure is present.

Potential Solution

I have found many suggestions in this forum by Analog Devices to connect the Tx with a coupler after the PA to the ORx port to improve the LO leakage tracking etc - but it shouldn't outright fail the initial calibration if this connection is not present. So I found the following solution;

The firmware keeps a status record for every calibration, and the host can read it with the GET CAL_STATUS command. The existing API function adi_adrv9025_TrackingCalTxLolStatusGet() does this for the LOL tracking calibration and reads the first 20 bytes. We send the same command, but for the internal LOL init calibration (object ADRV9025_CPU_OBJECTID_TXLOLINT_INIT) and read 120 bytes. Words 28 and 29 of that record are two floats that show how much LO leakage the calibration left: sqrt(w28² + w29²).

From in total 300 runs, it was above 850 when the LO leakage was still present, and below 1.4 when the init cal actually suceeded. This was tested with the LOs at different frequencies from 650 MHz to 5.9 GHz.

So the attached patch adds a new API function, adi_adrv9025_TxLolInternalInitCalCheck(). For each channel it reads that record and, while the value is above 10, runs the calibration again on that channel.

Root Cause?

Of course this is a bit of a hack this re-try mechanism. The actual root cause is probably in the correlator that gives back wrong results in about 50% of the cases that should actually be rejected. This is then further compounded by the aggregation mechanism => in bad runs when the correlator is not outputting correct values for the very first pulse train, later good correlations do not manage to overturn this bad measurement. So an easy fix could be to just repeat this measurement of correlating the pulse train when it fails.

Could you check this and maybe provide a firmware update for this so the fix is cleaner? Thanks a lot.

  • on Nov 3, 2026 3:16 PM Contains AI Generated Content
    0

    diff -u a/drivers/rf-transceiver/madura/devices/adrv9025/public/include/adi_adrv9025_cals.h b/drivers/rf-transceiver/madura/devices/adrv9025/public/include/adi_adrv9025_cals.h --- a/drivers/rf-transceiver/madura/devices/adrv9025/public/include/adi_adrv9025_cals.h +++ b/drivers/rf-transceiver/madura/devices/adrv9025/public/include/adi_adrv9025_cals.h @@ -892,6 +892,32 @@ int32_t adi_adrv9025_ClgcExternalPathDelayGet(adi_adrv9025_Device_t* device, adi_adrv9025_TxChannels_e txChannel, adi_adrv9025_ExternalPathDelay_t* externalPathDelay); +/** +* \brief Checks the result of the internal Tx LO leakage init calibration and re-runs it where it failed +* +* In about half of its runs, at random and independently, the internal Tx LOL init calibration +* (ADI_ADRV9025_TX_LO_LEAKAGE_INTERNAL) leaves the LO leakage uncorrected (-10 to -20 dBm at the Tx output at 10 dB +* attenuation, instead of -65 dBm or less) and still reports success. Words 28-29 (float) of the calibration's +* CAL_STATUS record follow the LO leakage it leaves and tell the two outcomes apart: below 1.4 after each of 152 +* good runs, above 850 after each of 148 bad ones (TX LO 650 MHz to 5.9 GHz). For each channel in txChannelMask +* (calibrated before) this function reads that record and re-runs the calibration on that channel alone until the +* value is below 10, at most maxReruns times. +* +* \pre The internal Tx LOL init calibration has run on the channels in txChannelMask +* +* \param device Pointer to the ADRV9025 device data structure +* \param txChannelMask Tx channels to check, bit 0 = Tx1 to bit 3 = Tx4 +* \param maxReruns Re-runs per channel at most (each about 0.9 s): 16 leaves a channel bad about once in 65000 +* (up to 10 bad runs in a row seen) +* \param reruns Re-runs per channel, 4 entries (NULL if not needed) +* +* \retval ADI_COMMON_ACT_ERR_RESET_FEATURE A channel still failed after maxReruns re-runs (all channels are tried) +* \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required +*/ +int32_t adi_adrv9025_TxLolInternalInitCalCheck(adi_adrv9025_Device_t* device, + uint8_t txChannelMask, + uint8_t maxReruns, + uint8_t reruns[4]); #ifdef __cplusplus } #endif diff -u a/drivers/rf-transceiver/madura/devices/adrv9025/public/src/adi_adrv9025_cals.c b/drivers/rf-transceiver/madura/devices/adrv9025/public/src/adi_adrv9025_cals.c --- a/drivers/rf-transceiver/madura/devices/adrv9025/public/src/adi_adrv9025_cals.c +++ b/drivers/rf-transceiver/madura/devices/adrv9025/public/src/adi_adrv9025_cals.c @@ -13,6 +13,7 @@ * see the "LICENSE.pdf" file in this zip file. */ +#include #include "adi_adrv9025_user.h" #include "adi_adrv9025_cals.h" #include "adi_adrv9025_hal.h" @@ -2645,3 +2646,115 @@ return (device->common.error.newAction); } + +int32_t adi_adrv9025_TxLolInternalInitCalCheck(adi_adrv9025_Device_t* device, + uint8_t txChannelMask, + uint8_t maxReruns, + uint8_t reruns[4]) +{ + static const uint8_t ARM_MEM_READ_AUTOINCR = 1; + static const uint32_t INIT_CALS_TIMEOUT_MS = 60000; + static const float RESIDUAL_LIMIT = 10.0f; /* good runs end below 1.4, bad ones above 850 */ + + uint8_t extData[3] = {ADRV9025_CPU_OBJECTID_CAL_STATUS, ADRV9025_CPU_OBJECTID_TXLOLINT_INIT, 0}; + uint8_t armData[120] = {0}; + adi_adrv9025_InitCals_t initCals = {ADI_ADRV9025_TX_LO_LEAKAGE_INTERNAL, 0, 0}; + uint8_t errorFlag = 0; + uint8_t failedMask = 0; + uint8_t channel = 0; + uint8_t run = 0; + uint8_t i = 0; + uint32_t word = 0; + float dc[2] = {0.0f, 0.0f}; + + ADI_NULL_DEVICE_PTR_RETURN(device); + + ADI_FUNCTION_ENTRY_LOG(&device->common, + ADI_COMMON_LOG_API); + + for (channel = 0; channel < 4; channel++) + { + if (reruns != NULL) + { + reruns[channel] = 0; + } + + if ((txChannelMask & (1U << channel)) == 0) + { + continue; + } + + for (run = 0;; run++) + { + /* The calibration's CAL_STATUS record: word 0 error code; words 28-29 (float) follow the LO leakage + * the calibration leaves */ + extData[2] = channel; + adi_adrv9025_CpuCmdWriteWait(device, + ADI_ADRV9025_CPU_TYPE_C, + ADRV9025_CPU_GET_OPCODE, + &extData[0], + sizeof(extData), + ADI_ADRV9025_GETTXLOLSTATUS_TIMEOUT_US, + ADI_ADRV9025_GETTXLOLSTATUS_INTERVAL_US, + ADRV9025_CPU_OBJECTID_TXLOLINT_INIT); + ADI_ERROR_RETURN(device->common.error.newAction); + + adi_adrv9025_CpuMemRead(device, + (uint32_t)ADRV9025_CPU_C_ADDR_MAILBOX_GET, + &armData[0], + sizeof(armData), + ARM_MEM_READ_AUTOINCR); + ADI_ERROR_RETURN(device->common.error.newAction); + + for (i = 0; i < 2; i++) + { + word = ((uint32_t)armData[112 + 4 * i]) | + ((uint32_t)armData[113 + 4 * i] << 8) | + ((uint32_t)armData[114 + 4 * i] << 16) | + ((uint32_t)armData[115 + 4 * i] << 24); + memcpy(&dc[i], &word, sizeof(float)); + } + + if ((armData[0] | armData[1] | armData[2] | armData[3]) == 0 && + dc[0] * dc[0] + dc[1] * dc[1] <= RESIDUAL_LIMIT * RESIDUAL_LIMIT) + { + break; + } + + if (run >= maxReruns) + { + failedMask |= (uint8_t)(1U << channel); + break; + } + + /* about half of all runs end like this, independently of each other: run it again on this channel */ + initCals.channelMask = (uint8_t)(1U << channel); + adi_adrv9025_InitCalsRun(device, + &initCals); + ADI_ERROR_RETURN(device->common.error.newAction); + + adi_adrv9025_InitCalsWait(device, + INIT_CALS_TIMEOUT_MS, + &errorFlag); + ADI_ERROR_RETURN(device->common.error.newAction); + + if (reruns != NULL) + { + reruns[channel]++; + } + } + } + + if (failedMask != 0) + { + ADI_ERROR_REPORT(&device->common, + ADI_COMMON_ERRSRC_API, + ADI_COMMON_ERR_API_FAIL, + ADI_COMMON_ACT_ERR_RESET_FEATURE, + failedMask, + "Internal Tx LOL init cal left the LO leakage uncorrected"); + ADI_ERROR_RETURN(device->common.error.newAction); + } + + return (device->common.error.newAction); +}

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.