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: 2944 don't report ASYNC EVENT after Fault Injection operation

Part Number: AWR2944

Hi all,

I want to inject a fault use function rlRfDualClkCompMonConfig, and then to detect the async event in 

mmwave eventFxn callback function MmwDemo_eventCallbackFxn.
But 2944 can't report  expect async event conrresponded to the fault I inject.
My test code is showed as below:
void fault_injection_inject(void)
{
    rlReturnVal_t ret = 0;
    rlAnaFaultInj_t rlAnaFaultInjection = { 0 };
    rlMonAnaEnables_t monitorInfo = { 0 };
    rlDualClkCompMonConf_t config = { 0 };

    config.reportMode = 2;
    config.dccPairEnables = 0x1F;
    ret = rlRfDualClkCompMonConfig(RL_DEVICE_MAP_INTERNAL_BSS, &config);
    if (ret != 0)
    {
        DebugP_assert(0);
    }                 
    
    monitorInfo.enMask1 = 0x00800000;
    ret = rlRfAnaMonConfig(RL_DEVICE_MAP_INTERNAL_BSS, &monitorInfo);
    if (ret != 0)
    {
        DebugP_assert(0);
    }

    rlAnaFaultInjection.miscFault = 0x02;
    ret = rlRfAnaFaultInjConfig(RL_DEVICE_MAP_INTERNAL_BSS, &rlAnaFaultInjection);
    if (ret != 0)
    {
        DebugP_assert(0);
    }
}
the function call position is after MMWave_init and before MmwRf_Init.
Could you please give some advice and support a good-work fault injection example.
  • Hi,

    There are a few points which need to be rectified.

    1) rlAnaFaultInjection.miscFault = 0x02;  For Misc fault only bit 0 is valid and others are reserved. Why are you setting the bit 1 here. Change it to bit zero.

    2) Also monitoring is done after the device sends out a frame in the inter frame time. You will need the device to transmit as well. So set the frame up accordingly. Also placing this function before Rf_Init will not make this API do anything. This API you have written is to configure the RF end only and before the communication is set up and that core is initialized you are calling your function. This will require change. 

    Currently we do not have any example code focusing on the fault injection. 

    You can refer to the link test example under the DFP package in the SDK package. That uses most of the mm wave link API's and will be good reference for you to test this feature. 

    Thanks,

    Pradipta.

  • Hi,

    Thanks for your advice, I change the Misc fault bit  to bit0  and change the fault injection called position to that before rlSensorStart in function MMWave_startLink.  The async event RL_RF_AE_MON_DCC_CLK_FREQ_REPORT have already been reported in mmwave eventFxn callback. 

    When async event is detected  I want to clear this fault injection, but my code doesn't work and this async event should be reported continuously. the report info is showed as picture:

    My stop code is showed as below:

    void fault_injection_clear(void)
    {
        rlReturnVal_t ret = 0;
        rlAnaFaultInj_t rlAnaFaultInjection = { 0 };
        rlAnaFaultInjection.miscFault = 0x00;
        ret = rlRfAnaFaultInjConfig(RL_DEVICE_MAP_INTERNAL_BSS, &rlAnaFaultInjection);
        if (ret != 0)
        {
            test_print("return %d\r\n", ret);
            DebugP_assert(0);
        }
    }
    
    static void mmwDemo_mssSocMonitorTask(void* args)
    {
        while(TRUE)
        {
            if(fault_inject_event_occur == 1)
            {
                fault_inject_event_occur = 0;
                fault_injection_clear();
            }
            vTaskDelay(SOC_MONITOR_TASK_DELAY);
        }
    }

    This function is called in a independent task and the return value of rlRfAnaFaultInjConfig is 251: RL_RET_CODE_FRAME_ONGOING. According to the error description, should  the disable fault inject operation be called when frame is not ongoing? Please give a official conclusion.

    Others, I called fault_injection_clear after frame end and the return value of rlRfAnaFaultInjConfig is RL_RET_CODE_OK, but the phenomenon that async event reported continuously also exist.  After I change the param reportMode of struct rlDualClkCompMonConf_t from 2 to 1, the async event will be only report once. so what is the difference between value 1 and  value 2.

                    "1      Report is send only upon a failure (after checking for thresholds) \n"
                    "2      Report is sent every monitoring period with threshold check. \n"
    After I clear the fault injection, How can I know if the fault have been clarified ?

    Could you please give some advice for the above questions.

  • Hi,

    1) The API rlRfAnaFaultInjConfig should always be issued when no frames are ongoing. This is also documented in the Interface Control Document (ICD) for AWR2944. 

    2) Can you share and also check your monitoring period and frame configuration. How many frames are currently used in this test application ?

    Thanks,

    Pradipta.

  • Hi, 

    Now my test sequence is showed as below:

    1. Config the param numFrames=1.

    2. Inject the fault    (fault_injection)

    3. rlSensorStart     

    4. Receive the async event and disable fault injection   (fault_injection_clear)

    5. Config the param numFrames=0 and rlSensorStart.    (ReStartSensor

     If reportMode=1, the async event will only be reported once.

     If reportMode=2, the async event will be reported continuously, the period is equal to the period of frame sending.

    the below code shows my frame configuration:

    	.dfeDataOutputMode = MMWave_DFEDataOutputMode_FRAME,
    	{
    		.chirpStartIdx = 0u,
    		.chirpEndIdx = 383u,
    		.numLoops = 1u,
    		.numFrames = 0u,
    		.numAdcSamples = 1024u,
    		.framePeriodicity = 15000000u,
    		.triggerSelect = 1u,
    		.frameTriggerDelay = 0u,
    	}};

    the other code is showed as below:

    void fault_injection_clear(void)
    {
        rlReturnVal_t ret = 0;
        rlAnaFaultInj_t rlAnaFaultInjection = { 0 };
    
        test_print ("rlRfAnaFaultInjConfig...\n");
        rlAnaFaultInjection.miscFault = 0x00;
        ret = rlRfAnaFaultInjConfig(RL_DEVICE_MAP_INTERNAL_BSS, &rlAnaFaultInjection);
        if (ret != 0)
        {
            test_print("return %d\r\n", ret);
            DebugP_assert(0);
        }
    }
    
    void ReStartSensor(void)
    {
        rlReturnVal_t ret = 0;
    
        /* Set the frame configuration: */
        test_print ("rlSetFrameConfig...\n");
        gMMWRF_CtrlCfg.frameCfg.numFrames = 0;
        ret = rlSetFrameConfig(RL_DEVICE_MAP_INTERNAL_BSS, &gMMWRF_CtrlCfg.frameCfg);
        if (ret != RL_RET_CODE_OK)
        {
            test_print("return %d\r\n", ret);
            DebugP_assert(0);
        }
    
        test_print ("rlSensorStart...\n");
        ret = rlSensorStart(RL_DEVICE_MAP_INTERNAL_BSS);
        if(ret != RL_RET_CODE_OK)
        {
            test_print("return %d\r\n", ret);
            DebugP_assert(0);
        }
    }
    void fault_injection(void)
    {
        rlReturnVal_t ret = 0;
        
        rlMonAnaEnables_t monitorInfo = { 0 };
        rlDualClkCompMonConf_t config = { 0 };
    
        config.reportMode = 2;
        config.dccPairEnables = 0x1F;
        ret = rlRfDualClkCompMonConfig(RL_DEVICE_MAP_INTERNAL_BSS, &config);
        if (ret != 0)
        {
            DebugP_assert(0);
        }                 
        
        monitorInfo.enMask1 = 0x00800000;
        ret = rlRfAnaMonConfig(RL_DEVICE_MAP_INTERNAL_BSS, &monitorInfo);
        if (ret != 0)
        {
            DebugP_assert(0);
        }
    
       rlAnaFaultInj_t rlAnaFaultInjection = { 0 };
       rlAnaFaultInjection.miscFault = 0x01;
       ret = rlRfAnaFaultInjConfig(RL_DEVICE_MAP_INTERNAL_BSS, &rlAnaFaultInjection);
       if (ret != 0)
       {
           DebugP_assert(0);
       }
    }

  • Hi,

    As discussed previously, can you send out one frame only and inject the fault for that frame and see the results. Also, please that you follow the correct seque4ncing in your code as per the ICD. 

    Thanks,

    Pradipta.

  • Hi, In the condition that 2944  send out only one frame per loop, the fault event also will be reported repeatedly.

    void fault_injection(void)
    {
        rlReturnVal_t ret = 0;
        
        rlMonAnaEnables_t monitorInfo = { 0 };
        rlDualClkCompMonConf_t config = { 0 };
    
        test_print ("Start the fault injection...\n");
    
        config.reportMode = 2;
        config.dccPairEnables = 0x1F;
        ret = rlRfDualClkCompMonConfig(RL_DEVICE_MAP_INTERNAL_BSS, &config);
        if (ret != 0)
        {
            DebugP_assert(0);
        }                 
        
        monitorInfo.enMask1 = 0x00800000;
        ret = rlRfAnaMonConfig(RL_DEVICE_MAP_INTERNAL_BSS, &monitorInfo);
        if (ret != 0)
        {
            DebugP_assert(0);
        }
    
       rlAnaFaultInj_t rlAnaFaultInjection = { 0 };
       rlAnaFaultInjection.miscFault = 0x01;
       ret = rlRfAnaFaultInjConfig(RL_DEVICE_MAP_INTERNAL_BSS, &rlAnaFaultInjection);
       if (ret != 0)
       {
           DebugP_assert(0);
       }
    }
    
    void fault_injection_clear(void)
    {
        rlReturnVal_t ret = 0;
        rlAnaFaultInj_t rlAnaFaultInjection = { 0 };
    
        test_print ("Clear the fault injection...\n");
        rlAnaFaultInjection.miscFault = 0x00;
        ret = rlRfAnaFaultInjConfig(RL_DEVICE_MAP_INTERNAL_BSS, &rlAnaFaultInjection);
        if (ret != 0)
        {
            test_print("return %d\r\n", ret);
            DebugP_assert(0);
        }
    }
    
    void ReStartSensor(void)
    {
        rlReturnVal_t ret = 0;
    
        /* Set the frame configuration: */
        // test_print ("rlSetFrameConfig...\n");
        // gMMWRF_CtrlCfg.frameCfg.numFrames = 0;
        // ret = rlSetFrameConfig(RL_DEVICE_MAP_INTERNAL_BSS, &gMMWRF_CtrlCfg.frameCfg);
        // if (ret != RL_RET_CODE_OK)
        // {
        //     test_print("return %d\r\n", ret);
        //     DebugP_assert(0);
        // }
    
        test_print ("Restart Sensor once...\n");
        ret = rlSensorStart(RL_DEVICE_MAP_INTERNAL_BSS);
        if(ret != RL_RET_CODE_OK)
        {
            test_print("return %d\r\n", ret);
            DebugP_assert(0);
        }
    }

  • Hi,

    I will need to check this on the bench once. Let me try to reproduce this observation and provide you further updates after that.

    Thanks,

    Pradipta.

  • Hi,

    As per my understanding this error you are observing is due to the non-handling of the async event and not the failure of DCC monitoring. In your code where you are handling async events please check if you have a case like below. If not, you will need to add it. I was able to run this bench without any such issues. 

    case RL_RF_AE_MON_DCC_CLK_FREQ_REPORT:
                    {
                        memcpy(&gMonDataAeStrct.monDccClkFreqRep, payload, sizeof(rlMonDccClkFreqRep_t));
                        gMonitoringStatus = ((rlMonDccClkFreqRep_t*)payload)->statusFlags;
                        if(gMonitoringStatus == 0U)
                        {
                            monFailRepCheck[23]++;
                        }
                        monAeCnt[23]++;
                        break;
                    }

    Check if this async event is handles. If yes, please provide your implementation. If not, then implement a similar one at your end.

    Thanks,

    Pradipta.

  • Hi,

    I add the implementation showed as below:

                    case RL_RF_AE_MON_DCC_CLK_FREQ_REPORT:
                    { 
                        test_print ("Error: Asynchronous Event_1 SB Id %d not handled\n", asyncSB);
                        if(fault_inject_event_occur == 2)
                        {
                            fault_inject_event_occur = 3;
                        }
                        memcpy(&MonDccClkFreqRep, payload, sizeof(rlMonDccClkFreqRep_t));
                        test_print ("statusFlags:%d\n", MonDccClkFreqRep.statusFlags);
                        test_print ("errorCode:%d\n", MonDccClkFreqRep.errorCode);
                        test_print ("timeStamp:%d\n", MonDccClkFreqRep.timeStamp);
                        for(uint8_t i = 0; i < 5; i++)
                        {
                            test_print("freqMeasVal[%d]:%d\n", i, MonDccClkFreqRep.freqMeasVal[i]);
                        }
                        break;
                    }

    But the issue also exist and the print info is:

    Could you please support your test project and I want to compare your code with my code .

  • Hi,

    This is the correct observation as per my understanding. The reporting mode is 2 hence Report is sent every monitoring period with threshold check. The status flags indicate pass status when the fault is cleared, and reports fail status when the fault is injected. There is a difference in the status flag values i can see in the snapshot shared. 

    With these changes i do not see any issue. In mode 2 you will always see the report whether pass or fail unless and until you disable the monitor itself.

    Thanks,

    Pradipta.

  • Thanks for your help.