This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AWR2243: AWR2243 profile configuration failing (NACK received)

Part Number: AWR2243

Hi,

I have a design on a ZYNQ chip were I am configuring the AWR2243 (on AWR2243boost board) via I2C using a softcore Microblaze processor running the DFP firmware with free-rtos (the design works great). The data is received via CSI2 or LVDS.

I have tried to port the code to the Arm A53 controller on the ZYNQ PS and I am getting -16 return value error only when I send the profile configuration (SBLKID 0x4044) command. From the documentation I saw that this is a NACK response caused by a false CRC but I am not sure where the error is.

The same design (with ARM) works when I initiate test pattern API instead of profile (to send ADC data). Also before the profile, many other APIs are successfully called (rf_init, data path and adc configuration etc...), so I dont understand with is the difference between these commands which can cause this?

Thanks,

Ivan

  • Hi Ivan,

    Can you provide more information on the issue to help us in the debugging. 

    1) Can you provide what programming sequence you are following in your code. What is the ordering of the API calls you are making

    2) Can you provide the API parameters for profile config API. 

    3) Can you let us know if you have made any changes to the previous working code that may be affecting this.

    Thanks,

    Pradipta.

  • Hi Pradipta,

    1.)
    I call the following:
    AWR_MSSVERSION_GET_SB,

    AWR_DEV_RFPOWERUP_SB,

    AWR_RF_INIT_SB,

    AWR_CHAN_CONF_SET_SB,

    AWR_ADCOUT_CONF_SET_SB,

    AWR_DEV_RX_DATA_FORMAT_CONF_SET_SB,

    AWR_LOWPOWERMODE_CONF_SET_SB,

    AWR_DEV_RX_DATA_PATH_CONF_SET_SB,

    AWR_DEV_RX_DATA_PATH_CLK_SET_SB,

    AWR_HIGHSPEEDINTFCLK_CONF_SET_SB,

    AWR_DEV_RX_DATA_PATH_LANEEN_SET_SB...


    And at the end I call either AWR_DEV_TESTPATTERN_GEN_SET_SB (which works) or the profile config (which fails).

    2.) I use the following defines to fillup the profile config data for one profile:
    // AWR_PROFILE_CONF_SB 0x0100
    #define x0100_PF_INDEX                                            0
    #define x0100_PF_VCO_SELECT                             0x02
    #define x0100_PF_CAL_LUT_UPDATE                    0
    #define x0100_START_FREQ_CONST                    77/53.644*1000000000        // 77 GHz
    #define x0100_IDLE_TIME_CONST                          7.5*1000/10                // 7.5 uS
    #define x0100_ADC_START_TIME_CONST            4*1000/10                    // 4 uS
    #define x0100_RAMP_END_TIME                             73.7*1000/10                // 73.7 uS
    #define x0100_TX_OUT_POWER_BACK_OFF_CODE        0
    #define x0100_TX_PHASE_SHIFTER                       0
    #define x0100_FREQ_SLOPE_CONST                   47.7*1000/48.279            // 47.7 MHz/uS
    #define x0100_TX_START_TIME                               0
    #define x0100_NUM_ADC_SAMPLES                      512
    #define x0100_DIG_OUT_SAMPLE_RATE               7400                        // ksps
    #define x0100_HPF_CORNER_FREQ1                   0
    #define x0100_HPF_CORNER_FREQ2                   0
    #define x0100_TX_CALIB_EN_CFG                         0
    #define x0100_RX_GAIN                                            30
    #define x0100_DFP_ADD_NUMBER_OF_PROFILES           1

    3.) I did had to regenerate the board support package (BSP) which contains the free-rtos instance, and I had to change the interrupt initialization since the interrupt HW has changed (from microblaze to ARM). The I2C and GPIO (for reset) peripherals remained the same in the PL of the ZYNQ Ultrascale+ chip.

  • Hi Ivan,

    In both the cases can you set a breakpoint just at the time when you are transferring the complete command for profile config over I2C line. We want to check what the master is transferring over I2C is same for both of the cases or not. Similarly, can probe the I2C lines near the mmWave device and see what data it is receiving. We want to see if the received data is same or not in both the cases for you. Can you share your observations with us so that we can procced further in the debug.

    Thanks, and Regards,

    Pradipta.

  • Hi Pradipta,

    I have activated the debug prints and found something I can not make sense of. Here is the debug print for the failing system:
    ############################################

         ###     PROFILE CONFIG     ##################################################     <\r><\n>
    <\r><\n>
    adcStartTimeConst  is 700 <\n>
    digOutSampleRate  is 4166 <\n>
    freqSlopeConst  is 1036 <\n>
    hpfCornerFreq1  is 0 <\n>
    hpfCornerFreq2  is 0 <\n>
    idleTimeConst  is 5000 <\n>
    numAdcSamples  is 256 <\n>
    pfCalLutUpdate  is 0 <\n>
    pfVcoSelect  is 2 <\n>
    profileId  is 0 <\n>
    rampEndTime  is 7500 <\n>
    rxGain  is 30 <\n>
    startFreqConst  is 1435388850 <\n>
    txCalibEnCfg  is 0txOutPowerBackoffCode  is 0 <\n>
    txPhaseShifter  is 0 <\n>
    txStartTime  is 1 <\n>
    profile_count  is 1 <\n>
         ###     PROFILE CONFIG     ##################################################     <\r><\n>
    <\r><\n>
    rlSetProfileConfig starts...<\r><\n>
    rlDriverIsDeviceMapValid starts <\r><\n>
    rlDriverIsDeviceMapValid ends <\r><\n>
    rlDriverGetPlatformId is called <\r><\n>
    rlDeviceIdentifyCmdDir starts...<\r><\n>
    rlDeviceIdentifyCmdDir ends...<\r><\n>
    rlDriverCmdInvoke starts... <\r><\n>
    rlDriverMsgWrite starts...<\r><\n>
    rlDriverCalChkSum starts...<\r><\n>
    rlDriverCalChkSum ends...<\r><\n>
    rlDriverCalCRC starts...<\r><\n>
    rlDriverCalCRC ends...<\r><\n>
    Sending [WR]0x1234 0x4321 0x0201 0x003E 0x5000 0x0000 0x0001 0xADBF 0x0100 0x0030 0x0000 0x0002 0x4BB2 0x558E 0x1388 0x0000 0x02BC 0x0000 0x1D4C 0x0000 0x0000 0x0000 0x0000 0x0000 0x040C 0x0001 0x0100 0x1046 0x0000 0x0000 0x001E 0x0000 0xCA73 <\r><\n>
    <\r><\n>
    I2C writing 66 bytes to 0x28<\r><\n>
    I2C write successful: 66<\r><\n>
    rlDriverMsgWrite ends...<\r><\n>
    rlDriverWaitForResponrlDriverHosts starts...<\r>IrqHandler <\n>
     <\r><\n>
    rlDriversarts...<\r><\n>
    <\r>MsgReadCmdCt<\n>
    rlDriverHoxr ends...<\r><\n>
    stIrqHandle<\r><\n>
    rlDriverMsrarts...<\r><\n>
    <\r>gCmdReply st<\n>
    arts...<\r><\n>
    rlDriverMsgRead starts...<\r><\n>
    rlDriverRxHdrRead starts...<\r><\n>
    Sending [WR]0x5678 0x8765 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF <\r><\n>
    <\r><\n>
    I2C writing 16 bytes to 0x28<\r><\n>
    I2C write successful: 16<\r><\n>
    rlDriverReceiveSync starts...<\r><\n>
    I2C reading 4 bytes<\r><\n>
    I2C read successful: 4<\r><\n>
    rlDriverReceiveSync ends...<\r><\n>
    I2C reading 12 bytes<\r><\n>
    I2C read successful: 12<\r><\n>
    rlDriverRxHdrRead ends...<\r><\n>
    rlDriverCalChkSum starts...<\r><\n>
    rlDriverCalChkSum ends...<\r><\n>
    rlDriverOriginDirCheck starts...<\r><\n>
    rlDriverOriginDirCheck ends...<\r><\n>
    I2C reading 2 bytes<\r><\n>
    I2C read successful: 2<\r><\n>
    rlDriverVerifyCRC starts...<\r><\n>
    rlDriverVerifyCRC ends...<\r><\n>
    rlDriverMsgRead ends...<\r><\n>
    rlDriverMsgCmdReply ends...<\r><\n>
    rlDriverMsgReadCmdCtx ends...<\r><\n>
    rlDriverWaitForResponse ends... <\r><\n>
    rlDriverMsgWrite starts...<\r><\n>
    rlDriverCalChkSum starts...<\r><\n>
    rlDriverCalChkSum ends...<\r><\n>
    rlDriverCalCRC starts...<\r><\n>
    rlDriverCalCRC ends...<\r><\n>
    Sending [WR]0x1234 0x4321 0x0201 0x003E 0x6000 0x0000 0x0001 0x9DBF 0x0100 0x0030 0x0000 0x0002 0x4BB2 0x558E 0x1388 0x0000 0x02BC 0x0000 0x1D4C 0x0000 0x0000 0x0000 0x0000 0x0000 0x040C 0x0001 0x0100 0x1046 0x0000 0x0000 0x001E 0x0000 0xF638 <\r><\n>
    <\r><\n>
    I2C writing 66 bytes to 0x28<\r><\n>
    I2C write successful: 66<\r><\n>
    rlDriverMsgWrite ends...<\r><\n>
    rlDriverWaitForRrlDriverHosendler starttIrqHandlers...<\r><\n>
     <\r><\n>
    rlD tarts...<\r><\n>
    riverMsgRead<\r><\n>
    rlDriverHoCandler endstIrqHandlers...<\r><\n>
    <\r><\n>
    rlD rts...<\r><\n>
    <\r><\n>
    riverMsgCmdReply starts...<\r><\n>
    rlDriverMsgRead starts...<\r><\n>
    rlDriverRxHdrRead starts...<\r><\n>
    Sending [WR]0x5678 0x8765 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF <\r><\n>
    <\r><\n>
    I2C writing 16 bytes to 0x28<\r><\n>
    I2C write successful: 16<\r><\n>
    rlDriverReceiveSync starts...<\r><\n>
    I2C reading 4 bytes<\r><\n>
    I2C read successful: 4<\r><\n>
    rlDriverReceiveSync ends...<\r><\n>
    I2C reading 12 bytes<\r><\n>
    I2C read successful: 12<\r><\n>
    rlDriverRxHdrRead ends...<\r><\n>
    rlDriverCalChkSum starts...<\r><\n>
    rlDriverCalChkSum ends...<\r><\n>
    rlDriverOriginDirCheck starts...<\r><\n>
    rlDriverOriginDirCheck ends...<\r><\n>
    I2C reading 2 bytes<\r><\n>
    I2C read successful: 2<\r><\n>
    rlDriverVerifyCRC starts...<\r><\n>
    rlDriverVerifyCRC ends...<\r><\n>
    rlDriverMsgRead ends...<\r><\n>
    rlDriverMsgCmdReply ends...<\r><\n>
    rlDriverMsgReadCmdCtx ends...<\r><\n>
    rlDriverWaitForResponse ends... <\r><\n>
    rlDriverMsgWrite starts...<\r><\n>
    rlDriverCalChkSum starts...<\r><\n>
    rlDriverCalChkSum ends...<\r><\n>
    rlDriverCalCRC starts...<\r><\n>
    rlDriverCalCRC ends...<\r><\n>
    Sending [WR]0x1234 0x4321 0x0201 0x003E 0x7000 0x0000 0x0001 0x8DBF 0x0100 0x0030 0x0000 0x0002 0x4BB2 0x558E 0x1388 0x0000 0x02BC 0x0000 0x1D4C 0x0000 0x0000 0x0000 0x0000 0x0000 0x040C 0x0001 0x0100 0x1046 0x0000 0x0000 0x001E 0x0000 0xE201 <\r><\n>
    <\r><\n>
    I2C writing 66 bytes to 0x28<\r><\n>
    I2C write successful: 66<\r><\n>
    rlDriverMsgWrite ends...<\r><\n>
    rlDriverWaitForResponsrlDriverHosestarts...<\r><\n>
    tIrqHandler <\r><\n>
    rlDriverM tarts...<\r><\n>
    sgReadCmdCtx<\r><\n>
    rlDriverH  ends...<\r><\n>
    <\r>ostIrqHandl<\n>
    rlDriverMsgetarts...<\r><\n>
    CmdReply sta<\r><\n>
    rts...<\r><\n>
    rlDriverMsgRead starts...<\r><\n>
    rlDriverRxHdrRead starts...<\r><\n>
    Sending [WR]0x5678 0x8765 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF <\r><\n>
    <\r><\n>
    I2C writing 16 bytes to 0x28<\r><\n>
    I2C write successful: 16<\r><\n>
    rlDriverReceiveSync starts...<\r><\n>
    I2C reading 4 bytes<\r><\n>
    I2C read successful: 4<\r><\n>
    rlDriverReceiveSync ends...<\r><\n>
    I2C reading 12 bytes<\r><\n>
    I2C read successful: 12<\r><\n>
    rlDriverRxHdrRead ends...<\r><\n>
    rlDriverCalChkSum starts...<\r><\n>
    rlDriverCalChkSum ends...<\r><\n>
    rlDriverOriginDirCheck starts...<\r><\n>
    rlDriverOriginDirCheck ends...<\r><\n>
    I2C reading 2 bytes<\r><\n>
    I2C read successful: 2<\r><\n>
    rlDriverVerifyCRC starts...<\r><\n>
    rlDriverVerifyCRC ends...<\r><\n>
    rlDriverMsgRead ends...<\r><\n>
    rlDriverMsgCmdReply ends...<\r><\n>
    rlDriverMsgReadCmdCtx ends...<\r><\n>
    rlDriverWaitForResponse ends... <\r><\n>
    rlDriverMsgWrite starts...<\r><\n>
    rlDriverCalChkSum starts...<\r><\n>
    rlDriverCalChkSum ends...<\r><\n>
    rlDriverCalCRC starts...<\r><\n>
    rlDriverCalCRC ends...<\r><\n>
    Sending [WR]0x1234 0x4321 0x0201 0x003E 0x8000 0x0000 0x0001 0x7DBF 0x0100 0x0030 0x0000 0x0002 0x4BB2 0x558E 0x1388 0x0000 0x02BC 0x0000 0x1D4C 0x0000 0x0000 0x0000 0x0000 0x0000 0x040C 0x0001 0x0100 0x1046 0x0000 0x0000 0x001E 0x0000 0x2F66 <\r><\n>
    <\r><\n>
    I2C writing 66 bytes to 0x28<\r><\n>
    I2C write successful: 66<\r><\n>
    rlDriverMsgWrite ends...<\r><\n>
    rlDriverWaitForRrlDriverHostendler starIrqHandler sts...<\r><\n>
     <\r><\n>
    rtrts...<\r><\n>
    <\r><\n>
    rlDriverHostlDriverHostIIrqHandler rqHandler enends...<\r><\n>
    <\r><\n>
    d...<\r><\n>
    <\r><\n>
    rlDriverMsgCmdReply starts...<\r><\n>
    rlDriverMsgRead starts...<\r><\n>
    rlDriverRxHdrRead starts...<\r><\n>
    Sending [WR]0x5678 0x8765 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF <\r><\n>
    <\r><\n>
    I2C writing 16 bytes to 0x28<\r><\n>
    I2C write successful: 16<\r><\n>
    rlDriverReceiveSync starts...<\r><\n>
    I2C reading 4 bytes<\r><\n>
    I2C read successful: 4<\r><\n>
    rlDriverReceiveSync ends...<\r><\n>
    I2C reading 12 bytes<\r><\n>
    I2C read successful: 12<\r><\n>
    rlDriverRxHdrRead ends...<\r><\n>
    rlDriverCalChkSum starts...<\r><\n>
    rlDriverCalChkSum ends...<\r><\n>
    rlDriverOriginDirCheck starts...<\r><\n>
    rlDriverOriginDirCheck ends...<\r><\n>
    I2C reading 2 bytes<\r><\n>
    I2C read successful: 2<\r><\n>
    rlDriverVerifyCRC starts...<\r><\n>
    rlDriverVerifyCRC ends...<\r><\n>
    rlDriverMsgRead ends...<\r><\n>
    rlDriverMsgCmdReply ends...<\r><\n>
    rlDriverMsgReadCmdCtx ends...<\r><\n>
    rlDriverWaitForResponse ends... <\r><\n>
    rlDriverCmdInvoke ends... <\r><\n>
    rlSetProfileConfig ends...<\r><\n>
    SBLKID 0x100 call failed for deviceMap 0x1 with error -16 <\r><\n>
    Radar configuration failed! <\r><\n>

    ##################################################################

    It looks like it is retrying and failing to execute the command...

    For the comparation, here are the debug prints of the working system:
    ###############################################################

         ###     PROFILE CONFIG     ##################################################     <\r><\n>
    <\r><\n>
    rlSetProfileConfig starts...<\r><\n>
    rlDriverIsDeviceMapValid starts <\r><\n>
    rlDriverIsDeviceMapValid ends <\r><\n>
    rlDriverGetPlatformId is called <\r><\n>
    rlDeviceIdentifyCmdDir starts...<\r><\n>
    rlDeviceIdentifyCmdDir ends...<\r><\n>
    rlDriverCmdInvoke starts... <\r><\n>
    rlDriverMsgWrite starts...<\r><\n>
    rlDriverCalChkSum starts...<\r><\n>
    rlDriverCalChkSum ends...<\r><\n>
    rlDriverCalCRC starts...<\r><\n>
    rlDriverCalCRC ends...<\r><\n>
    Sending [WR]0x1234 0x4321 0x0201 0x003E 0x5000 0x0000 0x0001 0xADBF 0x0100 0x0030 0x0000 0x0002 0x4BB2 0x558E 0x1388 0x0000 0x02BC 0x0000 0x1D4C 0x0000 0x0000 0x0000 0x0000 0x0000 0x040C 0x0001 0x0100 0x1046 0x0000 0x0000 0x001E 0x0000 0xCA73 <\r><\n>
    <\r><\n>
    I2C writing 66 bytes to 0x28<\r><\n>
    I2C write successful: 6rlDriverHostIrqHandler starts...<\r><\n>
    rlDriverHostIrqHandler ends...<\r><\n>
    6<\r><\n>
    rlDriverMsgWrite ends...<\r><\n>
    rlDriverWaitForResponse starts... <\r><\n>
    rlDriverMsgReadCmdCtx starts...<\r><\n>
    rlDriverMsgCmdReply starts...<\r><\n>
    rlDriverMsgRead starts...<\r><\n>
    rlDriverRxHdrRead starts...<\r><\n>
    Sending [WR]0x5678 0x8765 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF <\r><\r><\n>
    I2C writing 16 bytes to 0x28<\r><\n>
    I2C write successful: 16<\r><\n>
    rlDriverReceiveSync starts...<\r><\n>
    I2C reading 4 bytes<\r><\n>
    I2C read successful: 4<\r><\n>
    rlDriverReceiveSync ends...<\r><\n>
    I2C reading 12 bytes<\r><\n>
    I2C read successful: 12<\r><\n>
    rlDriverRxHdrRead ends...<\r><\n>
    rlDriverCalChkSum starts...<\r><\n>
    rlDriverCalChkSum ends...<\r><\n>
    rlDriverOriginDirCheck starts...<\r><\n>
    rlDriverOriginDirCheck ends...<\r><\n>
    I2C reading 2 bytes<\r><\n>
    I2C read successful: 2<\r><\n>
    rlDriverVerifyCRC starts...<\r><\n>
    rlDriverVerifyCRC ends...<\r><\n>
    rlDriverMsgRead ends...<\r><\n>
    rlDriverMsgCmdReply ends...<\r><\n>
    rlDriverMsgReadCmdCtx ends...<\r><\n>
    rlDriverWaitForResponse ends... <\r><\n>
    rlDriverCmdInvoke ends... <\r><\n>
    rlSetProfileConfig ends...<\r><\n>
    SBLKID 0x100 call successful. <\r><\n>

    ###################################################

    Could you make any sense of this?

    I dont think its anything to do with I2C becuase the HW is identical and the I2C IP core is instanciated in the FPGA PL which is copied from the working design (100KHz I2C). But I will check that too and let you know.

  • Hi,

    Checking the log, you sent internally with the team. Will get back to you with an update on this in a couple of days.

    Thanks,

    Pradipta.

  • Hi,

    Is there any system level difference between the two setups. Are the system clock speeds same for both the setup?

    Also, can you add a delay (say 10 ms for now) between each command and let us know your observations. 

    Thanks,

    Pradipta.