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: Port mmwavelink to Linux

Part Number: AWR1243BOOST
Other Parts Discussed in Thread: AWR1243

Hello,

I need to port the mmwavelink library to Linux. As far as i have understood the documentation, i have to either use the non-os approach or to implement my own library and "rls_osi.h" header. There are some topics in this forum about this issue, but i do not understand how to implement the "clientCtx.osiCb.queue.rlOsiSpawn" function on Linux. The non-OS approach stores the function call request in a global list and somewhere else this queue is explicitly processed. On the other hand the OS approach comes with just a "osiSpawn" declaration and a "osiExecute" function declaration which seems to be called nowhere. Could you please help me to understand what this function is supposed to do?

What would be the recommended way to control the AWR1243 on Linux? Starting with my research i though that it would be enough to implement the SPI functions only... but this seems to be too naive.

FYI: I am planning to connect the linux device and the AWR1243 directly via SPI.

Regards

  • Hello Olaf,

    Hopefully, you have already explored the DFP examples provided in the package and got to know (high level) what are the dependencies required to port this app on any platform.

    You need to refer this FAQ link where many of related threads talked about similar topic.

    https://e2e.ti.com/support/sensors/f/1023/t/856058

     

    In the source code of mmwavelink_example you see many of function pointers are assigned to clientCtx, this is way to assign multiple feature callbacks to mmwavelink.

    mmwavelink calls these callback function internally based on the communication flow with the device. osiSpawn also being called internally by mmwavelink library whenever it gets the notification of asynchronous event message from AWR device.

    Regards,

    Jitendra

  • Hello,

    Thanks for your quick response. Yes, i have investigated the examples and i am following the "porting guide". Step 1 and 2 are easy to do (using spidev interface). Step 3 states that rlDeviceEnable, rlDeviceDisable and rlRegisterInterruptHandler need to be implemented (no problem) but list 3 more functions with IRQ handling. I guess that i need to implement all 6 functions. Step 4 is no problem as well as the mutex and semaphore functions in step 5. However, i have a lack of understanding the purpose of rlOsiSpawn. Again, the non-OS example uses a global buffer in the "rlNonOsSpawn" function but this concept needs to call "rlNonOsMainLoopTask" at the right places in some functions but its clear when and who is executing the stored functions. In the OS example "osiSpawn" is called, but i do not see the counterpart (i excpect osiExecute). I can create a new thread to execute the spawned function. Or am i supposed to executed them in the main thread? Is "rlOsiSpawn" executed from different threads that are created in the mmwavelink code?

    Regards

  • Hello Olaf,

    For Non-OS you already understood that you need to invoke "rlNonOsMainLoopTask" to invoke the spawned function.

    Now for the OS environment, follow this sequence

    You may need to store pValue also to a global variable and use that while calling the spawned function within the thread function.

    Note: mmwavelink OS example calls directly the spawn function (rls_osi.c : osiSpawn). This is also an option but recommended to call the spawn function from a different context.

    Regards,

    Jitendra