Post Go back to editing

Error Running TALISE_runInitCal for TAL_TIA_3DB_CORNER

Hi ADI team,

We are bringing up the ADRV9008-2 on our custom platform

We have defined the appropriate HAL interfaces for reset, sysref control, SPI read/write
and also defined functions for stream/arm binary loading.

We have generated the  init .c/h files and TaliseStream.bin using the Transceiver evaluation software and remaining binaries have been downloaded.

we are currently seeing an error during  TALISE_runInitCals() / TALISE_waitInitCals()
We have separated out the calibration masks (ie.initCalMask) to determine which calibration maybe causing the issue ,


Looks like it fails after running calibration for TAL_TIA_3DB_CORNER

" ERROR: 294: TALISE_waitArmCmdStatus() failed due to thrown ARM error. Is device in correct state for calling command?
ERROR: 131086: Talise init calibration error encountered
ERROR: 514: TIA Init Cal: Error during TIA tuner calibration - Orx "

We have dumped the output of TALISE_getInitCalStatus()
calsSincePowerUp : 3
calsLastRun : 0
calsMinimum : 262145
initErrCal : 2
initErrCode : 2



Attaching application log for reference :

root@ec:~ ./adrv-app.out 
ADRV9009[main:129] [STEPS:1-4] Running TALISE_openHw ... ec
Loading fpga ...
Initializing FPGA-ADRV90082 SPI link ...
Initializing ARM-ADRV90082 SPI link ...
ADRV90082_SPI_INITConfiguring Clock buffer SI5386A ... 
Si5386A programming Started ...
Si5386A programming completed !!
halError : 0
ADRV9009[main:139]  [STEPS:5] Running TALISE_resetDevice 
MESSAGE: 0: TALISE_resetDevice()
halError : 0
ADRV9009[main:156] [STEPS:6] Running TALISE_initialize 
MESSAGE: 0: TALISE_initialize()
MESSAGE: 0: TALISE_calculateDigitalClocks()
MESSAGE: 0: TALISE_setSpiSettings()
MESSAGE: 0: TALISE_verifySpiReadWrite()
MESSAGE: 0: TALISE_getDeviceRev()
MESSAGE: 0: TALISE_initDigitalClocks()
MESSAGE: 0: TALISE_waitForEvent()
MESSAGE: 0: TALISE_waitForEvent()
MESSAGE: 0: TALISE_programFir()
MESSAGE: 0: TALISE_programFir()
MESSAGE: 0: TALISE_programOrxGainTable()
MESSAGE: 0: TALISE_setObsRxManualGain()
MESSAGE: 0: TALISE_setObsRxManualGain()
MESSAGE: 0: TALISE_setupJesd204bFramer()
MESSAGE: 0: TALISE_setupAdcSampleXbar()
MESSAGE: 0: TALISE_setupDeserializers()
MESSAGE: 0: TALISE_setupDacSampleXbar()
MESSAGE: 0: TALISE_setupDacSampleXbar()
MESSAGE: 0: TALISE_enableDeframerLink()
MESSAGE: 0: TALISE_enableDeframerLink()
MESSAGE: 0: TALISE_setTxAttenuation()
MESSAGE: 0: TALISE_setTxAttenuation()
ADRV9009[main:170]  [STEPS:7] Running TALISE_getPllsLockStatus 
MESSAGE: 0: TALISE_getPllsLockStatus()
ADRV9009[main:189]  [STEPS:8] Running TALISE_enableMultichipSync 
MESSAGE: 0: TALISE_enableMultichipSync()
ADRV9009[main:204]  [STEPS:8] Running TALISE_enableMultichipSync 
MESSAGE: 0: TALISE_enableMultichipSync()
MESSAGE: 0: TALISE_SerializerReset()
ADRV9009[main:217] [STEPS:10]  Running TALISE_initArm 
MESSAGE: 0: TALISE_initArm()
MESSAGE: 0: TALISE_writeArmConfig()
MESSAGE: 0: TALISE_writeArmMem()
MESSAGE: 0: TALISE_loadAdcProfiles
MESSAGE: 0: TALISE_writeArmMem()
MESSAGE: 0: TALISE_writeArmMem()
MESSAGE: 0: TALISE_writeArmMem()
MESSAGE: 0: TALISE_writeArmMem()
MESSAGE: 0: TALISE_writeArmMem()
ADRV9009[main:221] [STEPS:11-12] NOP Loading stream binaries
ADRV9009[main:226] Running TALISE_loadStreamFromBinary 
MESSAGE: 0: TALISE_loadStreamFromBinary()
MESSAGE: 0: TALISE_writeArmMem()
ADRV9009[main:236] [STEPS:13]  Running TALISE_loadArmFromBinary 
MESSAGE: 0: TALISE_loadArmFromBinary()
MESSAGE: 0: TALISE_writeArmMem()
MESSAGE: 0: TALISE_verifyArmChecksum()
MESSAGE: 0: TALISE_readArmMem()
MESSAGE: 0: TALISE_readArmMem()
MESSAGE: 0: TALISE_readArmMem()
MESSAGE: 0: TALISE_writeArmConfig()
MESSAGE: 0: TALISE_writeArmMem()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
ADRV9009[main:249] Running TALISE_verifyArmChecksum 
MESSAGE: 0: TALISE_verifyArmChecksum()
MESSAGE: 0: TALISE_readArmMem()
MESSAGE: 0: TALISE_readArmMem()
ADRV9009[main:268] [STEPS:14]  Running TALISE_setRfPllFrequency 
MESSAGE: 0: TALISE_setRfPllLoopFilter()
MESSAGE: 0: TALISE_setPllLoopFilter()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_checkInitCalComplete()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_writeArmMem()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
ADRV9009[main:283] [STEPS:15]  Running TALISE_getPllsLockStatus 
MESSAGE: 0: TALISE_getPllsLockStatus()
EC_DEBUG[main:300] [STEPS:16]  Running TALISE_runInitCal TAL_TX_BB_FILTER  
MESSAGE: 0: TALISE_runInitCals()
MESSAGE: 0: TALISE_sendArmCommand()
EC_DEBUG[main:312] [STEPS:16]  Running TALISE_waitInitCals 
MESSAGE: 0: TALISE_waitInitCals()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_getInitCalStatus()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmMem()
EC_DEBUG[main:331] calsSincePowerUp:1 calsLastRun:1 calsMinimum:262145 initErrCal:0 initErrCode:0
EC_DEBUG[main:300] [STEPS:16]  Running TALISE_runInitCal TAL_ADC_TUNER  
MESSAGE: 0: TALISE_runInitCals()
MESSAGE: 0: TALISE_sendArmCommand()
EC_DEBUG[main:312] [STEPS:16]  Running TALISE_waitInitCals 
MESSAGE: 0: TALISE_waitInitCals()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_getInitCalStatus()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmMem()
EC_DEBUG[main:331] calsSincePowerUp:3 calsLastRun:2 calsMinimum:262145 initErrCal:0 initErrCode:0
EC_DEBUG[main:300] [STEPS:16]  Running TALISE_runInitCal TAL_TIA_3DB_CORNER  
MESSAGE: 0: TALISE_runInitCals()
MESSAGE: 0: TALISE_sendArmCommand()
EC_DEBUG[main:312] [STEPS:16]  Running TALISE_waitInitCals 
MESSAGE: 0: TALISE_waitInitCals()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
ERROR: 294: TALISE_waitArmCmdStatus() failed due to thrown ARM error. Is device in correct state for calling command?
ERROR: 131086: Talise init calibration error encountered
EC_ERROR[main:318] talAction :6 
MESSAGE: 0: TALISE_getInitCalStatus()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmMem()
ERROR: 514: TIA Init Cal: Error during TIA tuner calibration - Orx
EC_DEBUG[main:331] calsSincePowerUp:3 calsLastRun:0 calsMinimum:262145 initErrCal:2 initErrCode:2
EC_DEBUG[main:300] [STEPS:16]  Running TALISE_runInitCal TAL_DC_OFFSET  
MESSAGE: 0: TALISE_runInitCals()
MESSAGE: 0: TALISE_sendArmCommand()
EC_DEBUG[main:312] [STEPS:16]  Running TALISE_waitInitCals 
MESSAGE: 0: TALISE_waitInitCals()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_getInitCalStatus()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmMem()
EC_DEBUG[main:331] calsSincePowerUp:11 calsLastRun:8 calsMinimum:262145 initErrCal:0 initErrCode:0
EC_DEBUG[main:300] [STEPS:16]  Running TALISE_runInitCal TAL_FLASH_CAL  
MESSAGE: 0: TALISE_runInitCals()
MESSAGE: 0: TALISE_sendArmCommand()
EC_DEBUG[main:312] [STEPS:16]  Running TALISE_waitInitCals 
MESSAGE: 0: TALISE_waitInitCals()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_getInitCalStatus()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmMem()
EC_DEBUG[main:331] calsSincePowerUp:75 calsLastRun:64 calsMinimum:262145 initErrCal:0 initErrCode:0
EC_DEBUG[main:300] [STEPS:16]  Running TALISE_runInitCal TAL_PATH_DELAY  
MESSAGE: 0: TALISE_runInitCals()
MESSAGE: 0: TALISE_sendArmCommand()
EC_DEBUG[main:312] [STEPS:16]  Running TALISE_waitInitCals 
MESSAGE: 0: TALISE_waitInitCals()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_getInitCalStatus()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmMem()
EC_DEBUG[main:331] calsSincePowerUp:203 calsLastRun:128 calsMinimum:262145 initErrCal:0 initErrCode:0
EC_DEBUG[main:300] [STEPS:16]  Running TALISE_runInitCal TAL_TX_LO_LEAKAGE_INTERNAL  
MESSAGE: 0: TALISE_runInitCals()
MESSAGE: 0: TALISE_sendArmCommand()
EC_DEBUG[main:312] [STEPS:16]  Running TALISE_waitInitCals 
MESSAGE: 0: TALISE_waitInitCals()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()

MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_getInitCalStatus()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmMem()
EC_DEBUG[main:331] calsSincePowerUp:459 calsLastRun:256 calsMinimum:262145 initErrCal:0 initErrCode:0
EC_DEBUG[main:300] [STEPS:16]  Running TALISE_runInitCal TAL_TX_QEC_INIT  
MESSAGE: 0: TALISE_runInitCals()
MESSAGE: 0: TALISE_sendArmCommand()
EC_DEBUG[main:312] [STEPS:16]  Running TALISE_waitInitCals 
MESSAGE: 0: TALISE_waitInitCals()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_getInitCalStatus()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmMem()
EC_DEBUG[main:331] calsSincePowerUp:1483 calsLastRun:1024 calsMinimum:262145 initErrCal:0 initErrCode:0
EC_DEBUG[main:300] [STEPS:16]  Running TALISE_runInitCal TAL_LOOPBACK_RX_LO_DELAY  
MESSAGE: 0: TALISE_runInitCals()
MESSAGE: 0: TALISE_sendArmCommand()
EC_DEBUG[main:312] [STEPS:16]  Running TALISE_waitInitCals 
MESSAGE: 0: TALISE_waitInitCals()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_getInitCalStatus()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmMem()
EC_DEBUG[main:331] calsSincePowerUp:3531 calsLastRun:2048 calsMinimum:262145 initErrCal:0 initErrCode:0
EC_DEBUG[main:300] [STEPS:16]  Running TALISE_runInitCal TAL_LOOPBACK_RX_RX_QEC_INIT  
MESSAGE: 0: TALISE_runInitCals()
MESSAGE: 0: TALISE_sendArmCommand()
EC_DEBUG[main:312] [STEPS:16]  Running TALISE_waitInitCals 
MESSAGE: 0: TALISE_waitInitCals()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_getInitCalStatus()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmMem()
EC_DEBUG[main:331] calsSincePowerUp:7627 calsLastRun:4096 calsMinimum:262145 initErrCal:0 initErrCode:0
EC_DEBUG[main:300] [STEPS:16]  Running TALISE_runInitCal TAL_ORX_QEC_INIT  
MESSAGE: 0: TALISE_runInitCals()
MESSAGE: 0: TALISE_sendArmCommand()
EC_DEBUG[main:312] [STEPS:16]  Running TALISE_waitInitCals 
MESSAGE: 0: TALISE_waitInitCals()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_getInitCalStatus()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmMem()
EC_DEBUG[main:331] calsSincePowerUp:138699 calsLastRun:131072 calsMinimum:262145 initErrCal:0 initErrCode:0
EC_DEBUG[main:300] [STEPS:16]  Running TALISE_runInitCal TAL_TX_DAC 
MESSAGE: 0: TALISE_runInitCals()
MESSAGE: 0: TALISE_sendArmCommand()
EC_DEBUG[main:312] [STEPS:16]  Running TALISE_waitInitCals 
MESSAGE: 0: TALISE_waitInitCals()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_getInitCalStatus()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
MESSAGE: 0: TALISE_readArmMem()
EC_DEBUG[main:331] calsSincePowerUp:400843 calsLastRun:262144 calsMinimum:262145 initErrCal:0 initErrCode:0
MESSAGE: 0: TALISE_enableFramerLink()
MESSAGE: 0: TALISE_enableFramerLink()
ADRV9009[TALISE_enableSysrefToFramer:1426] [STEPS:18]  Running Si5386A_sysref_req(SYSREF_CONT_ON) 
MESSAGE: 0: TALISE_enableSysrefToFramer()
ADRV9009[main:409] [STEPS:19]  Running TALISE_enableSysrefToFramer 
MESSAGE: 0: TALISE_enableDeframerLink()
MESSAGE: 0: TALISE_enableDeframerLink()
MESSAGE: 0: TALISE_enableSysrefToDeframer()
MESSAGE: 0: TALISE_readDeframerStatus()
MESSAGE: 0: TALISE_readFramerStatus()
ADRV9009[main:477] [STEPS:21]  Running TALISE_enableTrackingCals 
MESSAGE: 0: TALISE_enableTrackingCals()
MESSAGE: 0: TALISE_writeArmMem()
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()
ADRV9009[main:489] [STEPS:22]  Running TALISE_radioOn 
MESSAGE: 0: TALISE_sendArmCommand()
MESSAGE: 0: TALISE_waitArmCmdStatus()
MESSAGE: 0: TALISE_readArmCmdStatusByte()


talise_config :

/**
 * \file talise_config.c
 * \brief Contains Talise configuration settings for the Talise API
 *
 * Copyright 2015-2017 Analog Devices Inc.
 * Released under the AD9378-AD9379 API license, for more information see the "LICENSE.txt" file in this zip file.
 *
 * The top level structure taliseDevice_t talDevice uses keyword
 * extern to allow the application layer main() to have visibility
 * to these settings.
 *
 * This file may not be fully complete for the end user application and 
 * may need to updated for AGC, GPIO, and DAC full scale settings. 
 * To create a full initialisation routine, the user should also refer to the 
 * Iron Python initialisation routine generated by the GUI, and also the Talise User Guide.
 *
 */

#include "talise_types.h"
#include "talise_config.h"
#include "talise_error.h"
#include "talise_agc.h"

#include "linux_hal.h"
#ifdef ADI_ZYNQ_PLATFORM
#include "zynq_platform.h"
#endif

int16_t txFirCoefs[40] = {-14, 5, -9, 6, -4, 19, -29, 27, -30, 46, -63, 77, -103, 150, -218, 337, -599, 1266, -2718, 19537, -2718, 1266, -599, 337, -218, 150, -103, 77, -63, 46, -30, 27, -29, 19, -4, 6, -9, 5, -14, 0};

int16_t rxFirCoefs[48] = {0, 0, 2, 4, 4, -10, -46, -88, -68, 78, 280, 278, -154, -772, -792, 344, 1880, 1844, -932, -4528, -4408, 2592, 14186, 23192, 23192, 14186, 2592, -4408, -4528, -932, 1844, 1880, 344, -792, -772, -154, 278, 280, 78, -68, -88, -46, -10, 4, 4, 2, 0, 0};

int16_t obsrxFirCoefs[24] = {-10, 7, -10, -12, 6, -12, 16, -16, 1, 63, -431, 17235, -431, 63, 1, -16, 16, -12, 6, -12, -10, 7, -10, 0};

#ifdef ADI_ZYNQ_PLATFORM /** < Insert Customer Platform HAL State Container here>*/
/*
 * Platform Layer SPI settings - this structure is specific to ADI's platform layer code.
 * User should replace with their own structure or settings for their hardware
 */
zynqSpiSettings_t spiDev1 =
{
	.chipSelectIndex = 1,
	.writeBitPolarity = 0,
	.longInstructionWord = 1,
	.CPHA = 0,
	.CPOL = 0,
	.mode = 0,
	.spiClkFreq_Hz = 25000000
};

/*
 * Platform Layer settings - this structure is specific to ADI's platform layer code.
 * User should replace with their own structure or settings for their hardware
 * The structure is held in taliseDevice_t below as a void pointer, allowing
 * the customer to pass any information for their specific hardware down to the
 * hardware layer code.
 */
zynqAdiDev_t talDevHalInfo =
{
	.devIndex = 1,
	.spiSettings = &spiDev1,
	.spiErrCode = 0,
	.timerErrCode = 0,
	.gpioErrCode = 0,
	.logLevel = ADIHAL_LOG_ALL
};
#else
brhAdiDev_t brhTalDevHalInfo =
{
	//.devIndex = 1,
	//.spiSettings = &spiDev1,
	//.spiErrCode = 0,
	//.timerErrCode = 0,
	//.gpioErrCode = 0,
	.logLevel = ADIHAL_LOG_ALL
};
#endif
/**
 *  TalDevice a structure used by the Talise API to hold the platform hardware
 *  structure information, as well as an internal Talise API state container
 *  (devStateInfo) of runtime information used by the API.
 **/
taliseDevice_t talDevice =
{
#ifdef ADI_ZYNQ_PLATFORM
    /* Void pointer of users platform HAL settings to pass to HAL layer calls
     * Talise API does not use the devHalInfo member */
	.devHalInfo = &talDevHalInfo,
#else
	.devHalInfo = &brhTalDevHalInfo,     /* < Insert Customer Platform HAL State Container here>*/
#endif
	/* devStateInfo is maintained internal to the Talise API, just create the memory */
	.devStateInfo = {0}

};

taliseInit_t talInit =
{
	/* SPI settings */
    .spiSettings =
    {
		.MSBFirst            = 1,  /* 1 = MSBFirst, 0 = LSBFirst */
		.enSpiStreaming      = 0,  /* Not implemented in ADIs platform layer. SW feature to improve SPI throughput */
		.autoIncAddrUp       = 1,  /* Not implemented in ADIs platform layer. For SPI Streaming, set address increment direction. 1= next addr = addr+1, 0:addr=addr-1 */
		.fourWireMode        = 1,  /* 1: Use 4-wire SPI, 0: 3-wire SPI (SDIO pin is bidirectional). NOTE: ADI's FPGA platform always uses 4-wire mode */
		.cmosPadDrvStrength  = TAL_CMOSPAD_DRV_2X /* Drive strength of CMOS pads when used as outputs (SDIO, SDO, GP_INTERRUPT, GPIO 1, GPIO 0) */
	},
	
    /* Tx settings */
    .tx = 
    {
        .txProfile =
        {
            .dacDiv = 1,                        /* The divider used to generate the DAC clock */
            .txFir = 
            {
                .gain_dB = 6,                        /* filter gain */
                .numFirCoefs = 40,                    /* number of coefficients in the FIR filter */
                .coefs = &txFirCoefs[0]
            },
            .txFirInterpolation = 1,                    /* The Tx digital FIR filter interpolation (1,2,4) */
            .thb1Interpolation = 2,                    /* Tx Halfband1 filter interpolation (1,2) */
            .thb2Interpolation = 2,                    /* Tx Halfband2 filter interpolation (1,2)*/
            .thb3Interpolation = 2,                    /* Tx Halfband3 filter interpolation (1,2)*/
            .txInt5Interpolation = 1,                    /* Tx Int5 filter interpolation (1,5) */
            .txInputRate_kHz = 245760,                    /* Primary Signal BW */
            .primarySigBandwidth_Hz = 100000000,    /* The Rx RF passband bandwidth for the profile */
            .rfBandwidth_Hz = 225000000,            /* The Tx RF passband bandwidth for the profile */
            .txDac3dBCorner_kHz = 225000,                /* The DAC filter 3dB corner in kHz */
            .txBbf3dBCorner_kHz = 113000,                /* The BBF 3dB corner in kHz */
            .loopBackAdcProfile = {212, 140, 175, 90, 1280, 699, 1304, 59, 1343, 33, 913, 27, 48, 48, 34, 192, 0, 0, 0, 0, 48, 0, 7, 6, 42, 0, 7, 6, 42, 0, 25, 27, 0, 0, 25, 27, 0, 0, 165, 44, 31, 905}
        },
        .deframerSel = TAL_DEFRAMER_A,                    /* Talise JESD204b deframer config for the Tx data path */
        .txChannels = TAL_TX1,                            /* The desired Tx channels to enable during initialization */
        .txAttenStepSize = TAL_TXATTEN_0P05_DB,            /* Tx Attenuation step size */
        .tx1Atten_mdB = 0,                            /* Initial Tx1 Attenuation */
        .tx2Atten_mdB = 0,                            /* Initial Tx2 Attenuation */
        .disTxDataIfPllUnlock = TAL_TXDIS_TX_RAMP_DOWN_TO_ZERO    /* Options to disable the transmit data when the RFPLL unlocks. */
    },


    /* ObsRx settings */
    .obsRx = 
    {
        .orxProfile =
        {
            .rxFir = 
            {
                .gain_dB = 6,                /* filter gain */
                .numFirCoefs = 24,            /* number of coefficients in the FIR filter */
                .coefs = &obsrxFirCoefs[0]
            },
            .rxFirDecimation = 1,            /* Rx FIR decimation (1,2,4) */
            .rxDec5Decimation = 4,            /* Decimation of Dec5 or Dec4 filter (5,4) */
            .rhb1Decimation = 2,            /* RX Half band 1 decimation (1 or 2) */
            .orxOutputRate_kHz = 245760,            /* Rx IQ data rate in kHz */
            .rfBandwidth_Hz = 200000000,    /* The Rx RF passband bandwidth for the profile */
            .rxBbf3dBCorner_kHz = 225000,    /* Rx BBF 3dB corner in kHz */
            .orxLowPassAdcProfile = {185, 141, 172, 90, 1280, 942, 1332, 90, 1368, 46, 1016, 19, 48, 48, 37, 208, 0, 0, 0, 0, 52, 0, 7, 6, 42, 0, 7, 6, 42, 0, 25, 27, 0, 0, 25, 27, 0, 0, 165, 44, 31, 905},
            .orxBandPassAdcProfile = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
            .orxDdcMode = TAL_ORXDDC_DISABLED,   /* ORx DDC mode */
            .orxMergeFilter  = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
        },
        .orxGainCtrl = 
        {
            .gainMode = TAL_MGC,
            .orx1GainIndex = 255,
            .orx2GainIndex = 255,
            .orx1MaxGainIndex = 255,
            .orx1MinGainIndex = 195,
            .orx2MaxGainIndex = 255,
            .orx2MinGainIndex = 195
        },
        .framerSel = TAL_FRAMER_A,                /* ObsRx JESD204b framer configuration */
        .obsRxChannelsEnable = TAL_ORX1,        /* The desired ObsRx Channels to enable during initialization */
        .obsRxLoSource = TAL_OBSLO_RF_PLL                /* The ORx mixers can use the TX_PLL */
    },

    /* Digital Clock Settings */
    .clocks = 
    {
        .deviceClock_kHz = 122880,            /* CLKPLL and device reference clock frequency in kHz */
        .clkPllVcoFreq_kHz = 9830400,        /* CLKPLL VCO frequency in kHz */
        .clkPllHsDiv = TAL_HSDIV_2P5,            /* CLKPLL high speed clock divider */
        .rfPllUseExternalLo = 0,                /* 1= Use external LO for RF PLL, 0 = use internal LO generation for RF PLL */
        .rfPllPhaseSyncMode = TAL_RFPLLMCS_NOSYNC                /* RFPLL MCS (Phase sync) mode */
    },

    /* JESD204B settings */
    .jesd204Settings = 
    {
        /* Framer A settings */
        .framerA = 
        {
            .bankId = 0,                    /* JESD204B Configuration Bank ID -extension to Device ID (Valid 0..15) */
            .deviceId = 0,                    /* JESD204B Configuration Device ID - link identification number. (Valid 0..255) */
            .lane0Id = 0,                    /* JESD204B Configuration starting Lane ID.  If more than one lane used, each lane will increment from the Lane0 ID. (Valid 0..31) */
            .M = 2,                            /* number of ADCs (0, 2, or 4) - 2 ADCs per receive chain */
            .K = 32,                        /* number of frames in a multiframe (default=32), F*K must be a multiple of 4. (F=2*M/numberOfLanes) */
            .F = 4,                            /* F (number of bytes per frame) */
            .Np = 16,                            /* Np (converter sample resolution) */
            .scramble = 1,                    /* scrambling off if framerScramble= 0, if framerScramble>0 scramble is enabled. */
            .externalSysref = 1,            /* 0=use internal SYSREF, 1= use external SYSREF */
            .serializerLanesEnabled = 0x01,    /* serializerLanesEnabled - bit per lane, [0] = Lane0 enabled, [1] = Lane1 enabled */
            .serializerLaneCrossbar = 0xE4,    /* serializerLaneCrossbar */
            .lmfcOffset = 31,                /* lmfcOffset - LMFC offset value for deterministic latency setting */
            .newSysrefOnRelink = 0,            /* newSysrefOnRelink */
            .syncbInSelect = 0,                /* syncbInSelect; */
            .overSample = 0,                    /* 1=overSample, 0=bitRepeat */
            .syncbInLvdsMode = 1,
            .syncbInLvdsPnInvert = 0,
            .enableManualLaneXbar = 0 /* 0=auto, 1=manual */
        },
        /* Framer B settings */
        .framerB = 
        {
            .bankId = 0,                    /* JESD204B Configuration Bank ID -extension to Device ID (Valid 0..15) */
            .deviceId = 0,                    /* JESD204B Configuration Device ID - link identification number. (Valid 0..255) */
            .lane0Id = 0,                    /* JESD204B Configuration starting Lane ID.  If more than one lane used, each lane will increment from the Lane0 ID. (Valid 0..31) */
            .M = 2,                            /* number of ADCs (0, 2, or 4) - 2 ADCs per receive chain */
            .K = 32,                        /* number of frames in a multiframe (default=32), F*K must be a multiple of 4. (F=2*M/numberOfLanes) */
            .F = 0,                            /* F (number of bytes per frame) */
            .Np = 16,                            /* Np (converter sample resolution) */
            .scramble = 1,                    /* scrambling off if framerScramble= 0, if framerScramble>0 scramble is enabled. */
            .externalSysref = 1,            /* 0=use internal SYSREF, 1= use external SYSREF */
            .serializerLanesEnabled = 0x0C,    /* serializerLanesEnabled - bit per lane, [0] = Lane0 enabled, [1] = Lane1 enabled */
            .serializerLaneCrossbar = 0xE4,    /* serializerLaneCrossbar */
            .lmfcOffset = 31,                /* lmfcOffset - LMFC offset value for deterministic latency setting */
            .newSysrefOnRelink = 0,            /* newSysrefOnRelink */
            .syncbInSelect = 1,                /* syncbInSelect; */
            .overSample = 0,                    /* 1=overSample, 0=bitRepeat */
            .syncbInLvdsMode = 1,
            .syncbInLvdsPnInvert = 0,
            .enableManualLaneXbar = 0 /* 0=auto, 1=manual */
        },
        /* Deframer A settings */
        .deframerA = 
        {
            .bankId = 0,                    /* bankId extension to Device ID (Valid 0..15) */
            .deviceId = 0,                    /* deviceId  link identification number. (Valid 0..255) */
            .lane0Id = 0,                    /* lane0Id Lane0 ID. (Valid 0..31) */
            .M = 2,                            /* M  number of DACss (0, 2, or 4) - 2 DACs per transmit chain */
            .K = 32,                        /* K  #frames in a multiframe (default=32), F*K=multiple of 4. (F=2*M/numberOfLanes) */
            .scramble = 1,                    /* scramble  scrambling off if scramble= 0 */
            .externalSysref = 1,            /* externalSysref  0= use internal SYSREF, 1= external SYSREF */
            .deserializerLanesEnabled = 0x01,    /* deserializerLanesEnabled  bit per lane, [0] = Lane0 enabled */
            .deserializerLaneCrossbar = 0xE4,    /* deserializerLaneCrossbar */
            .lmfcOffset = 17,                /* lmfcOffset	 LMFC offset value to adjust deterministic latency */
            .newSysrefOnRelink = 0,            /* newSysrefOnRelink */
            .syncbOutSelect = 0,                /* SYNCBOUT0/1 select */
            .Np = 16,                /* Np (converter sample resolution) */
            .syncbOutLvdsMode = 1,
            .syncbOutLvdsPnInvert = 0,
            .syncbOutCmosSlewRate = 0,
            .syncbOutCmosDriveLevel = 0,
            .enableManualLaneXbar = 0 /* 0=auto, 1=manual */
        },
        /* Deframer B settings */
        .deframerB = 
        {
            .bankId = 0,                    /* bankId extension to Device ID (Valid 0..15) */
            .deviceId = 0,                    /* deviceId  link identification number. (Valid 0..255) */
            .lane0Id = 0,                    /* lane0Id Lane0 ID. (Valid 0..31) */
            .M = 0,                            /* M  number of DACss (0, 2, or 4) - 2 DACs per transmit chain */
            .K = 32,                        /* K  #frames in a multiframe (default=32), F*K=multiple of 4. (F=2*M/numberOfLanes) */
            .scramble = 1,                    /* scramble  scrambling off if scramble= 0 */
            .externalSysref = 1,            /* externalSysref  0= use internal SYSREF, 1= external SYSREF */
            .deserializerLanesEnabled = 0x00,    /* deserializerLanesEnabled  bit per lane, [0] = Lane0 enabled */
            .deserializerLaneCrossbar = 0xE4,    /* deserializerLaneCrossbar */
            .lmfcOffset = 0,                /* lmfcOffset	 LMFC offset value to adjust deterministic latency */
            .newSysrefOnRelink = 0,            /* newSysrefOnRelink */
            .syncbOutSelect = 1,                /* SYNCBOUT0/1 select */
            .Np = 16,                /* Np (converter sample resolution) */
            .syncbOutLvdsMode = 1,
            .syncbOutLvdsPnInvert = 0,
            .syncbOutCmosSlewRate = 0,
            .syncbOutCmosDriveLevel = 0,
            .enableManualLaneXbar = 0 /* 0=auto, 1=manual */
        },
        .serAmplitude = 15,                    /* Serializer amplitude setting. Default = 15. Range is 0..15 */
        .serPreEmphasis = 1,                /* Serializer pre-emphasis setting. Default = 1 Range is 0..4 */
        .serInvertLanePolarity = 0,            /* Serializer Lane PN inversion select. Default = 0. Where, bit[0] = 1 will invert lane [0], bit[1] = 1 will invert lane 1, etc. */
        .desInvertLanePolarity = 0,            /* Deserializer Lane PN inversion select.  bit[0] = 1 Invert PN of Lane 0, bit[1] = Invert PN of Lane 1, etc */
        .desEqSetting = 1,                    /* Deserializer Equalizer setting. Applied to all deserializer lanes. Range is 0..4 */
        .sysrefLvdsMode = 1,                /* Use LVDS inputs on Talise for SYSREF */
        .sysrefLvdsPnInvert = 0              /*0= Do not PN invert SYSREF */
    }
};

//Only needs to be called if user wants to setup AGC parameters
static taliseAgcCfg_t rxAgcCtrl =
{
    4,
    255,
    195,
    255,
    195,
    30720,  /* AGC gain update time in us (125us-250us - based on IQ data rate - set for 125us @ 245.76 Mhz) */
    10,
    10,
    16,
    0,
    1,
    0,
    0,
    0,
    1,
    31,
    246,
    4,
    1,          /*!<1- bit field to enable the multiple time constants in AGC loop for fast attack and fast recovery to max gain. */
    /* agcPower */
    {
        1,      /*!<1-bit field, enables the Rx power measurement block. */
        1,      /*!<1-bit field, allows using Rx PFIR for power measurement. */
        0,      /*!<1-bit field, allows to use the output of the second digital offset block in the Rx datapath for power measurement. */
        9,      /*!<AGC power measurement detect lower 0 threshold. Default = -12dBFS == 5, 7-bit register value where max = 0x7F, min = 0x00 */
        2,      /*!<AGC power measurement detect lower 1 threshold. Default = (offset) 4dB == 0, 4-bit register value where  max = 0xF, min = 0x00 */
        4,      /*!<AGC power measurement detect lower 0 recovery gain step. Default = 2dB - based on gain table step  size, 5-bit register value where max = 0x1F, min = 0x00 */
        4,      /*!<AGC power measurement detect lower 1 recovery gain step. Default = 4dB - based on gain table step size, 5-bit register value where max = 0x1F, min = 0x00 */
        5,      /*!< power measurement duration used by the decimated power block. Default = 0x05, 5-bit register value where max = 0x1F, min = 0x00 */
        5,      /*!<Allows power detection of data for a specific slice of the gain update counter. 16-bit register value (currently not used) */
        1,      /*!<Allows power detection of data for a specific slice of the gain update counter. 16-bit register value (currently not used) */
        5,      /*!<Allows power detection of data for a specific slice of the gain update counter. 16-bit register value (currently not used) */
        1,      /*!<Allows power detection of data for a specific slice of the gain update counter. 16-bit register value (currently not used) */
        2,      /*!<Default value should be 2*/
        0,
        0
    },
    /* agcPeak */
    {
        205,        /*!<1st update interval for the multiple time constant in AGC loop mode, Default:205. */
        2,          /*!<sets the 2nd update interval for the multiple time constant in AGC loop mode. Calculated as a multiple of  agcUnderRangeLowInterval  , Default: 4 */
        4,          /*!<sets the 3rd update interval for the multiple time constant in AGC loop mode. Calculated as a multiple of agcUnderRangeMidInterval and agcUnderRangeLowInterval, Default: 4 */
        39,         /*!<AGC APD high threshold. Default=0x1F, 6-bit register value where max=0x3F, min =0x00 */
        49,         /*!<AGC APD peak detect high threshold. default = 0x1F, 6-bit register value where max = 0x3F, min = 0x00.  Set to 3dB below apdHighThresh */
        23,         /*!<AGC APD peak detect low threshold. default = 3dB below high threshold, 6-bit register value where max =0x3F, min = 0x00 */
        19,         /*!<AGC APD peak detect low threshold. default = 3dB below high threshold, 6-bit register value where max = 0x3F, min = 0x00 . Set to 3dB below apdLowThresh  */
        6,          /*!<AGC APD peak detect upper threshold count. Default = 0x06 8-bit register value where max = 0xFF, min = 0x20  */
        3,          /*!<AGC APD peak detect lower threshold count. Default = 0x03, 8-bit register value where max = 0xFF, min = 0x00  */
        4,          /*!<AGC APD peak detect attack gain step. Default = 2dB step - based on gain table step size, 5-bit register  value, where max = 0x1F, min = 0x00  */
        2,          /*!<AGC APD gain index step size. Recommended to be same as hb2GainStepRecovery. Default = 0x00, 5-bit register value where max = 0x1F, min = 0x00  */
        1,          /*!<1-bit field, enables or disables the HB2 overload detector.  */
        1,          /*!<3-bit field. Sets the window of clock cycles (at the HB2 output rate) to meet the overload count. */
        1,          /*!<4-bit field. Sets the number of actual overloads required to trigger the overload signal.  */
        181,        /*!<AGC decimator output high threshold. Default = 0xB5, 8-bit register value where max = 0xFF, min = 0x00 */
        45,         /*!<AGC decimator output low threshold. Default = 0x80, 8-bit register value where max = 0xFF, min = 0x00 */
        90,         /*!<AGC decimator output low threshold. Default = 0x80, 8-bit register value where max = 0xFF, min = 0x00 */
        128,        /*!<AGC decimator output low threshold. Default = 0x80, 8-bit register value where max = 0xFF, min = 0x00 */
        6,          /*!<AGC HB2 output upper threshold count. Default = 0x06, 8-bit register value where max = 0xFF, min =  0x20 */
        3,          /*!<AGC HB2 output lower threshold count. Default = 0x03, 8-bit register value where max = 0xFF, min = 0x00 */
        2,          /*!<AGC decimator gain index step size. Default = 0x00, 5-bit register value where max = 0x1F, min = 0x00 */
        4,          /*!<AGC HB2 gain index step size, when the HB2 Low Overrange interval 0 triggers a programmable number  of times. Default = 0x08, 5-bit register value where max = 0x1F, min = 0x00 */
        8,          /*!<AGC HB2 gain index step size, when the HB2 Low Overrange interval 1 triggers a programmable number of times. Default = 0x04, 5-bit register value where max = 0x1F, min = 0x00 */
        4,          /*!<AGC decimator output attack gain step. Default = 2dB step - based on gain table step size, 5-bit register value, where max = 0x1F, min = 0x00 */
        1,
        0,
        0
    }
};



Any inputs on what could be causing this issue ?

Regards ,
Edmund.

Edit Notes

added reference to the attached files
[edited by: eddy-swe-slabs at 4:39 AM (GMT -4) on 16 Mar 2021]

Thread Notes