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.

AWR1243BOOST: A question about rlSpawn function in the mmw_example_nonos.c

Part Number: AWR1243BOOST

Hello ,TI team.

I have tried to port the DFP example code <mmwavelink_example> in DFP version 01_02_05_01, to a MSP430.

In the example, I find mmWaveLink uses clientCtx.osiCb.queue.rlOsiSpawn to invoke 'rlDriverMsgReadSpawnCtx'  funtion to read the async-event message in different interrupt context. But in the mmw_example_nonos.c,  clientCtx.osiCb.queue.rlOsiSpawn is the rlSpawn, and I can't find where invokes 'rlDriverMsgReadSpawnCtx'  funtion in the function.

In the mmw_example_nonos.c, the detail of rlOsiSpawn:

 /* Spawn Task */
clientCtx.osiCb.queue.rlOsiSpawn = (RL_P_OS_SPAWN_FUNC_PTR)rlSpawn;

In the rl_driver.c, the detail of rlOsiSpawn:

/* No response is expected, Add to the Spawn queue to be hanled in different context*/
(void)rlDrvData->clientCtx.osiCb.queue.rlOsiSpawn((RL_P_OSI_SPAWN_ENTRY)rlDriverMsgReadSpawnCtx, &rlDrvData->commDevIdx.rlDevIndex[deviceIndex], 0);

In the rl_nonos.c, the detail of rlSpawn:

rlInt32_t rlSpawn(rlSpawnEntryFunc_t pEntry, void* pValue, rlUInt32_t flags)
{
    return rlNonOsSpawn(pEntry, pValue, flags);
}

In the rl_nonos.c, the detail of rlNonOsSpawn:

rlNonOsRetVal_t rlNonOsSpawn(rlSpawnEntryFunc_t pEntry , void* pValue , rlUInt32_t flags)
{
     rlInt8_t i = 0;

#ifndef SL_TINY_EXT
    for (i=0 ; i<NONOS_MAX_SPAWN_ENTRIES ; i++)
#endif
    {
        rlNonOsSpawnEntry_t* pE = &rl_nonOsCB.SpawnEntries[i];

        if (NULL == pE->pEntry)
        {
            pE->pValue = pValue;
            pE->pEntry = pEntry;
#ifndef SL_TINY_EXT
            break;
#endif
        }
    }
    return NONOS_RET_OK;
}

 From above code, rlSpawn doesn't invoke the 'rlDriverMsgReadSpawnCtx'  funtion. How to read the async-event message?

  • Hi,

    While waiting for async -event you need to call rlNonOsMainLoopTask in while loop to  read any async-event message.

    In the same example it is being done for many of async-event messages (like power on async-event, rfInit etc.)

    while (mmwl_bInitComp == 0U)
    {
    rlNonOsMainLoopTask();
    rlAppSleep(1);
    timeOutCnt++;
    if (timeOutCnt > MMWL_API_INIT_TIMEOUT)
    {
    retVal = RL_RET_CODE_RESP_TIMEOUT;
    break;
    }
    }

    Regards,

    Jitendra