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.

Linux/AWR1243: AWR1243Boost HOST_INTR1 Issue

Part Number: AWR1243

Tool/software: Linux

Hi,

When I power up my AWR1243Boost board (with the firmware on it, but not connected to external MCU), it shows that the AR_HOSTINTR1 pin is high. However, the datasheet shows that it is a pull down pin. 
Therefore, I am wondering why the AR_HOSTINTR pin is high without an external MCU to send any CNYS commands and start the interaction.

Thanks

  • Does the pin stay high all the time?

    Thank you
    Cesar
  • Hi Cesar,

    No actually, it goes low when the host is communicating with the AWR1243.  However, I raised this issue because I was porting onto the Raspberry Pi Linux OS and I wasn't able to get AsyncEventHandlers working. However, that problem (porting_step9 in MMW_powerOnMaster in mmw_example.c) still persists. Not sure, how to get asynceventhandlers functioning correctly.  I read the radar interface control document but am unsure how to call MMWL_Asynceventhandler.

    Thanks.

  • Hi

    We are looking into this and will be able to get back to you early next week

    thank you
    Cesar
  • Hi,
    As soon as AWR1243 device is powerup, first thing it needs to do is send powerUpDone Async Event message to Host. For that, it raises HostIRQ High as a notification to Host that AWR1243 (slave) needs to send some message.
    MMWL_Asynceventhandler callback is registered to mmWaveLink at rlDevicePowerOn and it will get called when Host gets HostIRQ interrupt and it calls pHandler function.
    pHandler is handler function which is stored to application via this function.
    rlInt32_t (*rlRegisterInterruptHandler)(rlUInt8_t deviceIndex, RL_P_EVENT_HANDLER pHandler, void* pValue);

    Hope you have implemented registerInterruptHandler function as this-

    rlInt32_t MmwaveLink_registerInterruptHandler(rlUInt8_t deviceIndex, RL_P_EVENT_HANDLER pHandler, void* pValue)
    {
    /* this pHandler is rlDriverHostIrqHandler function which is passed by mmwavelink */
    g_HostIRQInterruptFunc = pHandler;
    return 0;
    }

    /* this is interrupt handler which is stitched with GPIO High event : HOSTIRQ connected to */
    void gpioInterruptHandler(...)
    {
    /* check if GPIO connected with HostIRQ is high */
    /* If yes then call mmwavelink Host IRQ handler function (rl_driver.c: rlDriverHostIrqHandler() ) */
    g_HostIRQInterruptFunc ();
    }


    On top of this make sure that you can implemented Mutex and semaphore correctly, as in case of Async event it will try to lock/re-lock the Mutex.
    So in case of locking the already locked Mutex, OS should wait for Mutex unlock by the first event.

    Regards,
    Jitendra
  • Hi Jitendra,

    Yes. I have already followed your pseudocode so it looks something like this:

    int rlsRegisterInterruptHandler(unsigned char deviceIndex, 
                                                          RLS_P_EVENT_HANDLER InterruptHdl , 
                                                          void* pValue){
    
      radarGpioInterruptHandler = InterruptHdl;
    
      return RLS_RET_CODE_OK;
    }
    
    //Interrupt handler registered with Rpi GPIO (deviceIndex = 0)
    void GpioInterruptHandler(unsigned char deviceIndex,int arg)
    {
    
        if (bcm2835_gpio_lev(HOST_IRQ_PIN) == HIGH)
        {
          printf("calling radarGpioInterruptHandler\n");
          radarGpioInterruptHandler(0,NULL);
        }
    }
    

    With regards to the Mutex Lock/unLock, I am using the POSIX standard and pthread_mutex_lock should block until the mutex becomes available. 

    With your help I was able to get the porting to work. Thanks.