Post Go back to editing

JESD204B - How to generate a custom pattern and repeat it

Thread Summary

The user asked how to set a custom 16-bit pattern for JESD204B testing on the ADRV9026 using the SPIWrites and the adi_adrv9025_FramerTestDataSet API. The solution involves configuring the adi_adrv9025_FrmTestDataCfg_t structure and using the spiWrite function to load the custom pattern. The same 16-bit pattern is transmitted on all enabled lanes, and it is not possible to set different patterns for each lane. For custom JESD204B configurations, the user should modify settings in the ADRV9025 Transceiver Evaluation Software GUI and generate the init.c files.
AI Generated Content

Hi,
According to ug-1727 there is a "Pattern Generator" and written"There is also a way the user can load a custom pattern into the framer which can be verified on the baseband processor"

So, How can I set the pattern and run test data?

I'm using ADRV9026 

Thanx!

Edit Notes

Added evb target
[edited by: Arthur Davidov at 11:04 AM (GMT 0) on 14 Jun 2020]

Thread Notes

  • If you are testing on EVB and TES GUI setup, please use the attached iron python script to load custom patterns.

    After executing the script, capture the RX data and check whether the transmitted and receive patterns are matching.

    7367.pattern repeat_script_ADRV9026.zip

  • Thank for your response!
    But we are not running with ADI's GUI, instead we use Xilinx FPGA and "ADRV9026 Released Software Package SW2.0.0.16


    In your script you set "FrmTestDataCfg=Types.adi_adrv9010_FrmTestDataCfg_t()" And i cant find:

    1. "Types" field in "adi_adrv9025_FrmTestDataCfg" structure

    2. "adi_adrv9010_FrmTestDataCfg_t" function doesn't exists

  • Please refer to adi_adrv9025_FramerTestDataSet API from adi_adrv9025_data_interface.h file.

    **
    * \brief Selects the PRBS type and enables or disables RX Framer PRBS generation
    *
    * This is a debug function to be used for debug of the Rx JESD204B lanes.
    * Rx data transmission on the JESD204B link(s) is not possible
    * when the framer test data is activated. To disable PRBS call this function
    * again with the framer data source set to FTD_ADC_DATA.
    *
    * \pre This function may be called any time after device initialization
    *
    * \dep_begin
    * \dep{device->common.devHalInfo}
    * \dep_end
    *
    * \param device is a pointer to the device settings structure
    * \param frmTestDataCfg is a pointer to a structure which contains the framer(s) of interest, testDataSource and injectPoint

    *
    *\retval ADI_COMMON_ACT_WARN_RESET_LOG Recovery action for log reset
    * \retval ADI_COMMON_ACT_ERR_CHECK_PARAM Recovery action for bad parameter check
    * \retval ADI_ADRV9025_ACT_ERR_RESET_SPI Recovery action for SPI reset required
    * \retval ADI_COMMON_ACT_NO_ACTION Function completed successfully, no action required
    */
    int32_t adi_adrv9025_FramerTestDataSet(adi_adrv9025_Device_t *device,
    adi_adrv9025_FrmTestDataCfg_t *frmTestDataCfg);

    Please refer to adi_adrv9025_FrmTestDataCfg_t from  adi_adrv9025_data_interface_types.h file.

    /**
    * \brief Data structure to hold ADRV9025 JESD204b Framer Test data and debug configuration
    */
    typedef struct adi_adrv9025_FrmTestDataCfg
    {
    uint8_t framerSelMask;
    adi_adrv9025_FramerDataSource_e testDataSource;
    adi_adrv9025_FramerDataInjectPoint_e injectPoint;
    } adi_adrv9025_FrmTestDataCfg_t;

  • Thank for effort!

    Its exactly my problem, according to quoted by you code section, how can I set the field Type= "my custom pattern" ? "Type" field is not part of "adi_adrv9025_FrmTestDataCfg_t" structure


    In your python script you used with a statement "FrmTestDataCfg = Types.adi_adrv9010_FrmTestDataCfg_t()" ,
    and what's the equivalent to this in "ADRV9026 Released Software Package SW2.0.0.16


    my code is:

    adi_adrv9025_FrmTestDataCfg_t frmTestDataCfg;

    <here I should set my custom pattern> 
    frmTestDataCfg.framerSelMask = ADI_ADRV9025_FRAMER_0;
    frmTestDataCfg.testDataSource = ADI_ADRV9025_FTD_PATTERN_REPEAT;
    frmTestDataCfg.injectPoint = ADI_ADRV9025_FTD_SERIALIZER;

  • <here I should set my custom pattern> 

    The custom pattern is set through the SPIWrites.

    ##### YOUR CODE GOES HERE #####
    #set the 16 bit user pattern
    #Test data to transmitted
    spiWrite(0x6e32, 0x55)
    spiWrite(0x6e33, 0x55) 

    In your python script you used with a statement "FrmTestDataCfg = Types.adi_adrv9010_FrmTestDataCfg_t()" , and what's the equivalent to this in "ADRV9026 Released Software Package SW2.0.0.16

    Please refer to the example code available in main.c file inside the API package. (Adi.Adrv9025.CustomerPkg_broad_market.2.0.0.12\Adi.Adrv9025.Api\src_broad_market\c_src\app\example.main.c)

    You need to use something similar below for adi_adrv9025_FramerTestDataSet API.


    /* Setup internal Tx test tone frequency */
    adi_adrv9025_TxTestToneCfg_t toneCfg = { 0 };
    toneCfg.txChannelMask = ADI_ADRV9025_TXALL;
    toneCfg.txToneFreq_Hz = 500000;
    toneCfg.txToneGain = ADI_ADRV9025_TX_NCO_0_DB;
    toneCfg.enable = 1;

    recoveryAction = adi_adrv9025_TxTestToneSet(adrv9025Device, &toneCfg, 1);
    if (recoveryAction != ADI_COMMON_ACT_NO_ACTION)
    {
    printf("Failed to setup ADRV9025 Tx Test Tone\n");
    printf("ERROR: Error number %d, Recovery action %d. In file %s, in function %s, in line %d, variable name %s. Error message %s.\n",
    adrv9025Device->common.error.errCode,
    adrv9025Device->common.error.newAction,
    adrv9025Device->common.error.errFile,
    adrv9025Device->common.error.errFunc,
    adrv9025Device->common.error.errLine,
    adrv9025Device->common.error.varName,
    adrv9025Device->common.error.errormessage);
    /* Call action handler */
    return ADI_COMMON_ACT_ERR_RESET_FULL;
    }

  • Hi, 
    About the 

    #set the 16 bit user pattern
    #Test data to transmitted
    spiWrite(0x6e32, 0x55)
    spiWrite(0x6e33, 0x55)

    The limit of pattern is only 16bits? Can we set a pattern of 64bit or larger?

  • Thanx,
    Do we can set different test pattern of 16bits for each lane?

  • It is not possible to set different test pattern for each lane simultaneously.

    The same data will be transmitted on all enabled lanes.