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.

AWR2243: Insight about Porting of the mmWave Link

Part Number: AWR2243

Hi Team,

i am currently working on porting the mmWave Link to a Linux based System. I successfully compiled the mmwave link library for my system. I implemented the Communication, Enable/Disable, Mutex and Semaphore Callback Function aswell as the AsyncEventHandler. Now i am a little bit stuck at the callback functions regarding the HostIRQ, especially the RegisterInterruptHandler. Can you give me more details about what this callback function should actually do and its relationship to the mask and unmask function. I am aware of the purpose of the HostIRQ when communicating.

Furthermore I am not quite sure, how to correctly implement the OsiSpawn Callback and what in detail is it function. Could you provide me with some information

Regards

Tim

  • Hi,

    I recommend using the google site search to find older forum threads on this topic

    Here is an example

    site e2e.ti.com OsiSpawn

    Here are some threads

    https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/915603/awr1243boost-port-mmwavelink-to-linux

    You can perform several searches with different keywords.

    The topic of porting mmwavelink to linux has been discussed in the past

    thank you

    Cesar

  • Hi Cesar,

    i already did that, but i still dont understand it.

    Can you tell me what should happen if the Host IRQ is triggered? Which function is called and whats the overall process of handling a Async Event? From my understanding all this happens in a different thread than the other stuff, am i correct?

    thank you

    Tim

  • Hi,

    Please give me one day to find the right person in our support team for this question

    thank you

    Cesar

  • Hi Cesar,

    Thank you, i am looking forward for the answers.

    Best Regards

    Tim

  • Hi Tim,

    Thanks for your patience.

    If Host IRQ is triggered, then the flow goes to Aync Event Read Loop. Further, it reads msg handler > write CNYS > wait for Host IRQ low and then send the async event accordingly.

    Please refer to section 3.2 for whole command/response flow in ICD document(mmwave_mcuplus_sdk_04_04_01_02/mmwave_dfp_02_02_04_00/docs/mmWave-Radar-Interface-Control.pdf).

    Thanks,
    Anirban

  • Hi Anirban,

    Thanks for you Answer. Is the Async Event Read Loop executed by the mmwave link library, or do i have to implement this on my own in my porting?

    From my understanding, the Application needs to run two different threads, one Thread who constantly waits for the HostIRQ Interrupt and another one who is doing all the rest, am i correct?

    Futhermore, i am unsure how i can tell my mmwave link library, that the interrupt was triggered. Is there some kind of Variable or function that should be written/envoked?

    Best regards

    Tim

  • Hello Tim,

    You have to implement the async event read loop in your application.

    mmwavelink library is OS agnostic library, it doesn't have any multi-threading concept involved. Host IRQs from AWR device comes to host via Host IRQ physical pin(check datasheet for Host Interrupt Pin)

    mmwavelink library has its own Host IRQ handler.

    Please go through the Command/Response sequence from ICD as I mentioned earlier and refer to the datasheet of AWR2243 section 9.3.2 (control), for more details. You may consider going through the mmwavelink source code as well and link with Command/Response flow diagram(ICD doc) for better understanding.

    Thanks,
    Anirban

  • Hi Anirban,

    Thanks for your quick answer, but i still have some open questions:

    So the async event read loop only is being executed shortly after the host issued a command?

    If there is no multi-threading concept involved, which purpose fulfills the osiSpawn Callback function?

    Which function do I have to call in my Async event read loop when a the Host Interrupt is being detected? How do the callback functions registerInterruptHandler, and the other ones regarding HostIRQ play into this

    Thanks,

    Tim

  • Hello,

    So the async event read loop only is being executed shortly after the host issued a command?

    Correct. But, not for every command. 
    If a command sent by the host expect a async event, then you need to run the loop to read the async event.

    If there is no multi-threading concept involved, which purpose fulfills the osiSpawn Callback function?

    mmWaveLink uses OsiSpawn function to invoke rlDriverMsgReadSpawnCtx function to read async event message in different interrupt contexts.  

    Which function do I have to call in my Async event read loop when a the Host Interrupt is being detected? How do the callback functions registerInterruptHandler, and the other ones regarding HostIRQ play into this
    rlRegisterInterruptHandler registers the rlDriverHostIrqHandler function as callback to the Host IRQ.
    You need to have an async event handler in the application that will handle the async events based on its type [e.g. cpufault status, frame trigger ready status, temperature report, other monitoring reports, etc]
    Thanks,
    Anirban
  • Hi Anirban,

    Thanks for the quick answer. Could you give me insight how the Async event read loop is being started? Those the rlDeviceWaitIrqStatus Callback function handle this?

    Thanks,

    Tim

  • Sorry Tim, we don't provide custom code.

    You can refer to the link test application present in AWR294x DFP(ver >2.4.8). It has similar type of implementation that you're looking for.

    Thanks,
    Anirban 

  • Hi Anirban,

    i am not asking for custom code, just wanna know if the Async Event Read Loop needs to be implemented in the rlDeviceWaitIrqStatus Callback Function, which is listed in the porting guide.

    Thanks,

    Tim

  • Hi Tim,

    No.

    Async event read loop should be implemented in your custom application. And this function is only for checking async events from AWR device e.g. bootup status/various fault status, etc..

    If you're implementing the async event read function for such kind of purpose then you should call rlDriverMsgRead function that will read the header and payload. Now, if the msg is verified and event type is async, then the flow will go to the async event handler.

    Thanks,
    Anirban