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.

MMWAVE-DFP: Trouble implementing interrupt handler, radar interrupt handler is NULL

Part Number: MMWAVE-DFP

I am implementing the interrupt handler for mmwavelink as per this thread: AWR1243: mmwave link API interrupt function implementation - Sensors forum - Sensors - TI E2E support forums

Specifically this block of code: 

RL_P_EVENT_HANDLER radarGpioIntrHandler ;

int rlsRegisterInterruptHandler(unsigned char deviceIndex,    RL_P_EVENT_HANDLER InterruptHdl ,  void* pValue)

{
   radarGpioIntrHandler = pHandler;
//Assuming single chip connection

}


// This is interrupt handler which is registered with GPIO (connect to HostIRQ line)
void GpioInterruptHandler(uint32 arg)
{
  // check if this GPIO is high
  // clear the interrupt
   
    //invoke lastly registered interrupt handler of mmwavelink
   if (radarGpioIntrHandler != NULL)
            {
                /* Call the radar link function registered with the device
                 * index. (single chip : i =0)
                 */
                radarGpioIntrHandler(i, NULL);
                // device index for single chip can be known in advanced as there is only HOSTIRQ connected.
                // In case of multiple device connected, application needs to check which HostIRQ is raised high and mapped to corresponding AWR1243 device index.
            }


}

Upon executing my application the radarGpioIntrHandler is NULL so radarGpioIntrHandler(0,NULL) is never called. 

My question: why is radarGpioIntrHandler NULL and how can I work around this?

  • Hi Jordan,

    int rlsRegisterInterruptHandler(unsigned char deviceIndex,    RL_P_EVENT_HANDLER InterruptHdl ,  void* pValue)
    
    {
       radarGpioIntrHandler = pHandler;
    //Assuming single chip connection
    
    }

    This section of code from the original thread contains a typo (also clarified in later replies of that thread). While this should show up as a compiler error, I just wanted to confirm that you don't have this error in your code.

    To investigate further, could you create a volatile global counter, increment that counter in rlsRegisterInterruptHandler, let the application run, pause it and see the value of the global counter in the expressions window in CCS?

    Regards,

    Aayush

  • Thank you for the quick reply, I had already accounted for that typo. I followed your advice to create a volatile global counter. After executing my application it appears the global counter was not incremented meaning my rlsRegisterInterruptHandler is never called. What could be possible reasons for this?

    I should add that I am also observing the HOSTIRQ does indeed go high during execution of my application as shown here:

    **Update: I figured out some of my error handling was off, I have resolved the original problem of this thread.