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/AWR1243BOOST: Porting to Raspberry Pi SPI Interface

Part Number: AWR1243BOOST
Other Parts Discussed in Thread: AWR1243, MMWAVE-DFP,

Tool/software: Linux

Hi,

I am currently in the process of porting the AWR1243 to the Raspberry Pi (NOOBS OS). Therefore, I am required to implement the functions in rls_studio.h and rls_osi.h. I noticed that the function rlsSpiOpen in rls_studio.h returns rlsDevHandle_t which is the radarlink studio device handle. I looked through the documentation and comments and cannot get any more information on what rlsDevHandle points to and how to get that information. Any help would be great.

Thanks!

  • Hi,

    Please refer mmwavelink_example provided in the mmwave-DFP which uses 'mmwlstudio\mmwlstudio.lib' library to communicate to AWR1243BOOST over FTDI SPI interface.

    In case you are porting wit Raspberry Pi, then you would be connecting SPI lines directly from AWR1243BOOST header (J5/J6) to Raspberry SPI lines (MOSI/MISO etc.) and [along with that HostIRQ., nReset, nError] Refer AWR1243 datasheet for more info.

    And for direct connection for AWR1243 with external processor  (Raspberry) you don't need to use mmwlstudio library.

    Anyways answer to your query about datatype of rlsDevHandle_t: it is void * which is assigned by mmwavelink when it calls any callbacks (callbacks which is set along with rlDevicePowerOn). mmWaveLink passes rlComIfHdl_t type communication handle which is nothing but return handle by 'rlComIfOpen' callback.

    I hope you are able to port and implement mmwavelink with NOOBS OS. Please let us know if you are facing any issue while porting mmwavelink on this OS.

    Regards,

    Jitendra

  • Hi Jitendra,

    Thanks for the clarification. I have connected the lines as you have described. In addition, I have created my own dynamic library for mwwlstudio (implementing the functions in rls_osi and rls_studio) and am using mmwl_example as a guidance to port .

    However, in regards to your answer about rlsDevHandle_t. I understand its a void* but specifically, in the rlsSpiOpen function, there is no handle to point to since this function simply gains GPIO access on a Raspberry Pi through a SPI library for Raspberry Pi. I am currently getting a seg fault due to " rl_driverData.clientCtx.comIfCb.rlComIfOpen(index, 0U)" (line 1817 in rl_driver.c)
    and I do not think I am implementing that function correctly.

    Thanks,
    Arsh Buch
  • Hi,
    For AWR1243 communication with external Host we one reference with TDA3x (Radar SDK/Vision SDK).
    I would recommend you referring this SDK to implement the equivalent SPI communication at RasPI. (bspdrv_ar12xxPriv.c: bsp_ar12xxRegisterCallbacks).

    rl_driverData.clientCtx.comIfCb.rlComIfOpen(index, 0U) will invoke the callback function which you may have passed to rlDevicePower [under clientCtx). So in your callback rlComIfOpen you need to open RasPI SPI interface and return the SPI driver handle from this function which mmwavelink can use later to communicate (Rx: rlComIfRead /Tx:rlComIfWrite) over SPI.

    For 'rlDeviceEnable' callback: implement a callback where it takes the nReset line high to power on AWR1243 device.
    'rlDeviceWaitIrqStatus' callback: implement a callback which check the HostIRQ GPIO to go low.
    'rlRegisterInterruptHandler': register/stitch this handler to the GPIO [HostIRQ] interruptHandler which will get invoked when AWR1243 takes HostIRQ High.

    Regards,
    Jitendra
  • Hi Jitendra,

    Thanks for that. It seems like my SPI_HOSTINTR1 Line is always high. I am sending 0x5678 then 0x8765 with 6 0xFFFFs but the interrupt line is not going low.
    The trace.txt log looks like this:


    Is this an issue with the way I am dealing with the interrupt or asyncEventHandler? If so, where should I be looking at?

    Thanks!

  • Hi,
    Did you download the firmware/patch over SPI just after first power up async-event message?
    With AWR1243 ES3.0 you must need to load the MasterSS and RadarSS firmware over SPI as given the flow in the mmwavelink_example. After loading the firmware only you need to invoke the RF-power on command.
    If you are using AWR1243 EVM then optionally you can try to flash this firmware to device and skip the firmware SPI download. Please be noted that in AWR1243 flashing the firmware is just for development purpose, whereas in the production it (FW) must be loaded over SPI.


    Regards,
    Jitendra