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: Can't run advanced frame based on Processor SDK Radar 3.07 ar1243 device driver

Part Number: AWR2243

Hi, Team!

I have custom cascade radar board with AWR1243P and stable project based on Processor SDK Radar 3.07 and ar1243 driver. And now I try to migrate to AWR2243P radar device. I have prepared driver with these instructions for migrating.
When I try to run new appimage with AWR1243P I get the following log messages by SPI after Bsp_ar12xxStartRadar() issuing :


[IPU1-0] 138.122674 s: [SPI ] rlDriverRxHdrRead:1807::Device [0] Host IRQ Low
[IPU1-0] 138.122948 s: [SPI ] rlLogSpiReadWrite:3301::Device [0] [RD]0xDCBA 0xABCD
[IPU1-0] 138.123253 s: [SPI ] rlLogSpiReadWrite:3301::Device [0] [RD]0x0012 0x0016 0x0000 0x0000 0x0001 0xFFD6
[IPU1-0] 138.123558 s: [SPI ] rlLogSpiReadWrite:3301::Device [0] [RD]0x0000 0x0008 0x0016 0x0140
[IPU1-0] 138.124473 s: [SPI ] rlLogSpiReadWrite:3301::Device [0] [RD]0xD648
[IPU1-0] 138.124595 s: [ERR ] rlDriverMsgCmdReply:907::Msg id is mis-matched
[IPU1-0] 138.124748 s: [ERR ] rlDriverWaitForResponse:2500::msg id mis-match, command failure

I found error ID: 22 No valid frame configuration API was issued and frames are started.
My RF configuration code

#define CASCADE_RADAR_TX_START_TIME_US         (0U) 
#define CASCADE_RADAR_ADC_START_TIME_US        (5U)
#define CASCADE_RADAR_RAMP_END_TIME_US         (20U)
#define CASCADE_RADAR_IDLE_TIME_US             (3U)

#define CASCADE_RADAR_START_FREQ_GHZ           (77U)
#define CASCADE_RADAR_SLOPE_MHZ_PER_US         (50U)

#define CASCADE_RADAR_GAIN                     (36U)
                                    
#define CASCADE_RADAR_ADC_SAMPLE_RATE_KHZ      (18750U)

#define CASCADE_RADAR_FRAME_PERIODICITY_MS     (100U)

/* Advanced frame parameters */
/* SubFrame 0 */
#define ADVFRM_0_CHIRP_START_IDX                  0x0
#define ADVFRM_0_NUM_OF_CHIRPS                    4
#define ADVFRM_0_NUM_LOOPS                        32
#define ADVFRM_0_BURST_PERIODICITY_US              (ADVFRM_0_NUM_OF_CHIRPS \
                                                    * (CASCADE_RADAR_RAMP_END_TIME_US + CASCADE_RADAR_IDLE_TIME_US)\
                                                    * ADVFRM_0_NUM_LOOPS + 10U)
#define ADVFRM_0_NUM_OF_BURST                     1
#define ADVFRM_0_NUM_OF_BURST_LOOPS               1                                                    
#define ADVFRM_0_SUBFRAME_PERIODICITY_US          (5000U)
                                                    
/* SubFrame 1 */                                                    
#define ADVFRM_1_CHIRP_START_IDX                  0x3
#define ADVFRM_1_NUM_OF_CHIRPS                    5
#define ADVFRM_1_NUM_LOOPS                        32
#define ADVFRM_1_BURST_PERIODICITY_US             (ADVFRM_1_NUM_OF_CHIRPS \
                                                   * (CASCADE_RADAR_RAMP_END_TIME_US + CASCADE_RADAR_IDLE_TIME_US) \
                                                   * ADVFRM_1_NUM_LOOPS + 10U)
#define ADVFRM_1_NUM_OF_BURST                     1
#define ADVFRM_1_NUM_OF_BURST_LOOPS               1                                                    
#define ADVFRM_1_SUBFRAME_PERIODICITY_US          (CASCADE_RADAR_FRAME_PERIODICITY_MS * 1000 - ADVFRM_0_SUBFRAME_PERIODICITY_US)

I can't understand where is my mistake. It was working well for AWR1243P.
Has anyone encountered such a problem? Has anyone run advanced frame configuration? 

  • Hi,

    For AWR2243 there is different firmware patch needs to be loaded, compare to AWR1243P.

    You can find latest firmware patch from this mwmave DFP  https://www.ti.com/tool/download/MMWAVE-DFP-2G

    Include this file in C:\ti\mmwave_dfp_02_02_03_01\firmware\xwr22xx_metaImage.h (for AWR2243 ES1.1) in  bspdrv_ar12xxFmwPriv.c (ti_components\drivers\bspdrv_ar12xxFmwPriv\packages\ti\drv\vps\src\devices\radar_ar12xx\src)

    Another point to note that bootup sequence is slightly different for AWR2243 ES1.0 and ES1.1 device. And for that you DFP example

    C:\ti\mmwave_dfp_02_02_03_01\ti\example\mmWaveLink_Cascade_Example

    If you have already taken this into account then check and confirm the firmware patch version using rlDeviceGetVersion API, that is currently already used within bspdrv_ar12xxpriv.c  Bsp_ar12xxPrintVersion()

    This version must match with the version mentioned in the mmWave DFP release note  C:\ti\mmwave_dfp_02_02_03_01\docs\mmwave_dfp_release_notes.pdf

    Now above error [Msg id is mis-matched] can arise if message ID value in response message (from AWR device) doesn't match with the msgID in the command message.

    Please make sure that you have updated mmwavelink library from mmWave DFP 2.2.3.1 package to vision SDK.

    Regards,

    Jitendra

  • Thank you for your reply!


    Yes, I'm using the latest DFP, I'm linked to DFP 2.2.3.1 in PDK Rules.make file. 

    I got device revision out and I have determind that It's ES1.1.
    I couldn'n find difference for ES1.1 and ES1.0 in mmWaveLink_Cascade_Example exept note "no more ESM/CPU fault at the boot up & during file-download".But I have no troubles with firmware download. Should I worry about this note?

    Bsp_ar12xxPrintVersion() gave me the following:

    [IPU1-0] 6.827121 s: AWR12XX: Version Master : 2.2.1.7
    [IPU1-0] 6.827243 s: AWR12XX: Version RF:2.2.0.13
    [IPU1-0] 6.827365 s: AWR12XX: Version mmWaveLink:2.2.3.1
    [IPU1-0] 6.827456 s: AWR12XX: Version Master Patch[dd.mm.yy]:29.7.20
    [IPU1-0] 6.827578 s: AWR12XX: Version RF Patch[dd.mm.yy]:6.4.21

    It,s look like mmwave_dfp_release_notes versions exept patch versions. We can see the patch release data here but other values are given in mmwave_dfp_release_notes:

    RadarSS Firmware PATCH 2.2.3.3
    MSS Firmware PATCH  2.2.2.0

    Is that correct? 

    About the message ID mis-match. My SPI exchange looks like following:

    [IPU1-0] 19.368876 s: [SPI ] rlDriverHostIrqHandler:571::Device [0] Host IRQ High
    [IPU1-0] 19.369212 s: [SPI ] rlLogSpiReadWrite:3297::Device [0] [WR]0x1234 0x4321 0x0281 0x0016 0x5000 0x0000 0x0001 0xAD67 0x0140 0x0008 0x0001 0x0000 0xB4D5
    [IPU1-0] 19.369669 s: [SPI ] rlLogSpiReadWrite:3297::Device [0] [WR]0x5678 0x8765 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF
    [IPU1-0] 19.370585 s: [SPI ] rlDriverRxHdrRead:1807::Device [0] Host IRQ Low
    [IPU1-0] 19.370859 s: [SPI ] rlLogSpiReadWrite:3301::Device [0] [RD]0xDCBA 0xABCD
    [IPU1-0] 19.371164 s: [SPI ] rlLogSpiReadWrite:3301::Device [0] [RD]0x0012 0x0016 0x5000 0x0000 0x0001 0xAFD6
    [IPU1-0] 19.371469 s: [SPI ] rlLogSpiReadWrite:3301::Device [0] [RD]0x0000 0x0008 0x0016 0x0140
    [IPU1-0] 19.371713 s: [SPI ] rlLogSpiReadWrite:3301::Device [0] [RD]0xBEEC
    [IPU1-0] 19.371835 s: [ERR ] rlDriverMsgCmdReply:907::Msg id is mis-matched
    [IPU1-0] 19.371957 s: [ERR ] rlDriverWaitForResponse:2500::msg id mis-match, command failure

    You can see that I'm issuing command with OPCODE 0x0281 (it is AWR_RF_FRAME_TRIG_MSG  ID=0x0A) but the device respond me with error message (OPCODE  0x0012) and indicate error 22. So I can't understand what's wrong?

    UPD

    I've got radar worked with normal frame configuration. It uses above configuration and 5 chirps.
    But the advframe option still doesn't work.

    Regards,

    Igor

  • Hi Igor,

    Due to festive season here, I will reply here next week with possible solution.

    Thanks for your patience and understanding.

    Regards,

    Jitendra

  • Hi Igor,

    THis error code means that frame configuration is not sent to device and before that rlSensorStart (SBID: 0x0140) is being called.

    #define RL_RET_CODE_FRAME_CFG_NOT_RECVD (22U) /* No valid frame configuration API was issued and frames are started */

    SO could you check if you have called rlSetAdvFrameConfig API before.

    You can refer DFP example as mentioned in above reply.

    Regards,

    Jitendra

  • Hi Jitendra,
    I apologize for delay, we were fixing hardware troubles.
    I have found that my rlSetAdvFrameConfig call was returning error code 94: "Burst ON time is > BURST_PERIOD". The problem with advanced frame configuration was that I didn't take into account Minimum Inter Burst Time and Minimum Inter Sub-frame Time requirements. I have added extra time and got the working configuration. Right now my configuration looks like this

    /* Advanced frame parameters */
    #define ADVFRM_INTERBURST_TIME                    (500U)
    #define ADVFRM_INTERSUBFRM_TIME                   (1000U)
    /* SubFrame 0 */
    #define ADVFRM_0_CHIRP_START_IDX                  0x0
    #define ADVFRM_0_NUM_OF_CHIRPS                    4
    #define ADVFRM_0_NUM_LOOPS                        32
    #define ADVFRM_0_BURST_PERIODICITY_US              (ADVFRM_0_NUM_OF_CHIRPS \
                                                        * (CASCADE_RADAR_RAMP_END_TIME_US + CASCADE_RADAR_IDLE_TIME_US)\
                                                        * ADVFRM_0_NUM_LOOPS + ADVFRM_INTERBURST_TIME)
    #define ADVFRM_0_NUM_OF_BURST                     1
    #define ADVFRM_0_NUM_OF_BURST_LOOPS               1
    #define ADVFRM_0_SUBFRAME_PERIODICITY_US          (ADVFRM_0_BURST_PERIODICITY_US + ADVFRM_INTERSUBFRM_TIME)
                                                        
    /* SubFrame 1 */                                                    
    #define ADVFRM_1_CHIRP_START_IDX                  0x3
    #define ADVFRM_1_NUM_OF_CHIRPS                    5
    #define ADVFRM_1_NUM_LOOPS                        32
    #define ADVFRM_1_BURST_PERIODICITY_US             (ADVFRM_1_NUM_OF_CHIRPS \
                                                       * (CASCADE_RADAR_RAMP_END_TIME_US + CASCADE_RADAR_IDLE_TIME_US) \
                                                       * ADVFRM_1_NUM_LOOPS + ADVFRM_INTERBURST_TIME)
    #define ADVFRM_1_NUM_OF_BURST                     1
    #define ADVFRM_1_NUM_OF_BURST_LOOPS               1                                                    
    #define ADVFRM_1_SUBFRAME_PERIODICITY_US          (CASCADE_RADAR_FRAME_PERIODICITY_MS * 1000 - ADVFRM_0_SUBFRAME_PERIODICITY_US)

    So problem is fixed, thank you very much!

    Regards,
    Igor