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.

AWR1243: mmwavelink without os does not work

Part Number: AWR1243

Hi everyone,

I started development of software for a board using multiple AWR1243. Hardware is not available yet, so I am using the AWR1243BOOST to test my control software. The software runs on an 32 bit ARM Coretex processor, and has no OS environment. According to documentation of mmwavelink that should work just fine.

As I have no OS, I have nothing like mutexes and semaphores, so I did not define the according function callbacks in rlClientCbs_t.osiCb - they are all NULL. When I run the code my processor crashes with a "hard fault" due to call to NULL. It turns out the library is trying to create a mutex in rl_driver.c, line 1932:

rlReturnVal_t rlDriverOsiInit(void)
{
    rlReturnVal_t retVal;

    /* Create Global Mutex Object */
    if (rl_driverData.clientCtx.osiCb.mutex.rlOsiMutexCreate(
           &rl_driverData.globalMutex, (rlInt8_t*)"GlobalLockObj") != RL_RET_CODE_OK)
    {
        retVal = RL_RET_CODE_RADAR_OSIF_ERROR;
    }
    // ...
}

As far as I can see that function is called with out any condition which might prevent the call when I call rlDevicePowerOn() - which I have to.

What do I have to do to get the code running without an RTOS?

  • Fabian,

    On a high level, you will need to implement non-os equivalent of the functions that are listed in the "OSAL"
    ($mmwave_sdk_01_00_00_05\packages\ti\drivers\osal) of the SDK.

    The error/fault you are getting is due to the NULL that you have set for the Mutex create function.

    -Raghu
  • Hi Raghu,

    this means that I also have to implement tasks? This function also seems to be required. And implementing tasks, I also need a memory management, processes etc. So I would basically have to implement an RTOS? Using an existing one would be much easier I guess.

  • Hi Fabian,

    For mmWaveLink specifically, You need to implement NonOS implementation of semaphore, mutex and Spawn(queue or context switch).
    Refer to below document for more details:
    ti/control/mmwavelink/docs/doxygen/html/structrl_osi_cbs__t.html

    All these routines can be implemented using simple global variable based loop to implement them. Let us know if you need more information.

    Regards,
    Kaushal
  • Hi,

    thanks for the info. I just throw a small FreeRTOS on the system and it works now with these function implemented.

    Hoever, you should check on your documentation, bacause it clearly says that semaphores/mutexes and tasks are NOT REQUIRED if in non-OS environment: "The mmWaveLink driver can work in both OS and NonOS environment. If Application prefers to use operating system, it needs to implement basic OS routines such as tasks, mutex and Semaphore".

    Best regards,

    Fabian