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.

AWR2944: Fault Injection Problem

Part Number: AWR2944

Hello experts,

Refer to the mmWave Radar Interface Control Document  8.18 Analog Fault injection,  I want to use the fault injection API function to inject faults and get the error infomation.

    (void)memset((void *)&rlAnaFaultInjection, 0, sizeof(rlAnaFaultInj_t));
    rlAnaFaultInjection.rxGainDrop = 0x01;
    retVal = rlRfAnaFaultInjConfig(RL_DEVICE_MAP_INTERNAL_BSS,&rlAnaFaultInjection);

    retVal = rlDriverExecuteGetApi(RL_DEVICE_MAP_INTERNAL_BSS, 
                                   RL_RF_ASYNC_EVENT_MSG,
                                   RL_RF_AE_MON_RX_GAIN_PHASE_REPORT, 
                                   (uint8_t *)&SocMonitor_RfMonRxGainPhReport,
                                   (uint16_t)sizeof(rlMonRxGainPhRep_t));

But when execute the function rlDriverExecuteGetApi,the program will stuck in assert.

The information from CCS debug seems that when wait for the message, a asyncEvent occurred.

So How to resolve this problem

Many thanks.

  • And all of these operations are executed in MmwDemo_initTask, before triggering the frames.

  • Hi,

    Where exactly have you put up the custom code in the initTask function. Can you provide screen shot of the error you are facing. 

    Thanks,

    Pradipta.

  • OK, custom code is in the red box.

    And the assert infomation is as shown in the following screenshot.

  • Hi,

    So currently your code has not stated the scheduler which is started after the end of the MmwDemo_initTask. So, the task which was created in this API call to handle the communication with the Radar Subsystem is currently non-operational. Hence when you are getting an Async event you have no task to handle the async event. Thus, your application is going into an asset. 

    Thanks,

    Pradipta.

  • Ok,I will try your suggestion, but in the manual, it requir that the API should be issued when no frames are on-going, if  I use the scheduler to execute the task, it may affect the RSS or other module.

  • Hi,

    Currently there is no active task to handle the communication between the Radar SS and your MSS/DSS. That is where your execution is getting stuck. The fault injection API is to communicate with the RSS. So you will need that in your application. I can suggest you write your own custom application to check this feature. You can refer to the latest SDK package from our website. It contains the DFP package as well which has a test example which you can refer to code your custom application.

    Thanks,

    Pradipta.

  • Hi,

    Refer to the SDK mmwave_mcuplus_sdk_04_03_00_01, I creat a periodic task to get  the error status. this time, the program don't stuck in the assert, but still can‘t read the error status. so any other suggestion? or could you show your example code which can work normally?

    Thank you.

  • Hi,

    What are the sequence of steps you are following in your execution. Please attach code snippets for steps so that we can debug your case. Also the latest SDK has a link test example in the DFP folder 2.4.8.1 Refer to the dfp user guide to get more info on that example and you can use that as a reference to create your custom code. 

    Thanks,

    Pradipta.

  • Hi expert,

    I search the documents and code in Folder 2.4.8.1, can't find the example you mentioned, could you list the file name and line.

    And now, my operation is:

    1. I wait for the frame end

    2. Inject a fault  RL_RF_AE_MON_RX_GAIN_PHASE_REPORT

    3. Read the error status per 2ms,and read 10 times continuously

    4. Clear the injected fault before next frame start.

    void Fault_Injection_Clear(void)
    {
        signed int retVal;
    
        rlAnaFaultInjection.rxGainDrop = 0x00;
        retVal = rlRfAnaFaultInjConfig(RL_DEVICE_MAP_INTERNAL_BSS, &rlAnaFaultInjection);
    }
    
    void Fault_Injection(void)
    {
        signed int retVal;
         
        /**
         * @brief Primary Fault: RX Gain. This field indicates which RX RF sections should have \n
                   fault injected. If the fault is enabled, the RX RF gain drops significantly. \n
                   The fault can be used to cause significant gain change, inter-RX gain imbalance \n
                   and an uncontrolled amount of inter-RX phase imbalance. \n
                   This fault can be seen in RX_GAIN_PHASE_MONITOR. \n
                    Bit RX Channel  \n
                     0  RX0         \n
                     1  RX1         \n
                     2  RX2         \n
                     3  RX3         \n
                    Others RESERVED \n
                    For each bit, 1 = inject fault, 0 = remove injected fault
         */ 
        (void)memset((void *)&rlAnaFaultInjection, 0, sizeof(rlAnaFaultInj_t));
        rlAnaFaultInjection.rxGainDrop = 0x01;
        retVal = rlRfAnaFaultInjConfig(RL_DEVICE_MAP_INTERNAL_BSS,&rlAnaFaultInjection);
    }
    
    int8_t   Get_Fault_Cnt = 10;
    uint32_t Fault_Resault;
    static void Fault_Inj_Task(void* args)
    {   
      
        while (1)
        {
            if (FrameEndFlag == 1)
            {
                FrameEndFlag = 0;
                Fault_Injection();
                Get_Fault_Cnt = 9;
            }
            if ( 0<=Get_Fault_Cnt && Get_Fault_Cnt<= 9)
            {
                Fault_Resault = rlDriverExecuteGetApi(RL_DEVICE_MAP_INTERNAL_BSS, 
                                       RL_RF_ASYNC_EVENT_MSG,
                                       RL_RF_AE_MON_RX_GAIN_PHASE_REPORT, 
                                       (uint8_t *)&SocMonitor_RfMonRxGainPhReport,
                                       (uint16_t)sizeof(rlMonRxGainPhRep_t));/**/
                Get_Fault_Cnt--;
            }
            else if (Get_Fault_Cnt < 0)
            {
                Fault_Injection_Clear();
                Get_Fault_Cnt = 10;
            }
    
            vTaskDelay(2);   
        }
    }

    If there is any mistake, please hlep me find and debug it.

    Many thanks.

  • Hi experts,

    Could you help me to resolve this problem?

  • Hi Woody,

    The path for the example test project as below

    C:\ti\mmwave_mcuplus_sdk_04_04_00_01\mmwave_dfp_02_04_08_01\ti\control\mmwavelink\test

    Here will be the documentation for this

    C:\ti\mmwave_mcuplus_sdk_04_04_00_01\mmwave_dfp_02_04_08_01\docs

    Please follow this sequence in your code.

    1) Configure and Enable the monitor where you wish to inject the fault. 

    2) Do the fault injection.

    3) Trigger a frame.

    4) After the frame is ended you will receive a monitoring report. Check this report to verify the fault injection. After the faults are injected, the
    regular enabled monitors will indicate the faults in their associated reports.

    5) Remove the fault.

    You can use these steps above for each fault injection you want to observe. 

    Thanks,

    Pradipta.