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: About SPI clock frequency in MMWAVE-DFP

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

Hi,

Is it possible to change the SPI clock frequency in mmw_example.c of MMWAVE-DFP?
When mmwavelink_example.exe is executed, the SPI clock frequency is 10MHz.
I would like to lower this to 1MHz or less. Can you tell me how to do this?
The DFP version is 1.2.5.1.

Thanks,
Hiroyuki Taguchi

  • Hi Hiroyuki-san,

    mmWavelink_example uses pre-built library (mmwl_port_ftdi.lib) to communicate with AWR1243 over SPI (using onboard FTDI chip: SPI to USB converter)

    Although this library source code is now provided in mmWave Studio v2.1 which you import to mwmavelink_example visual studio project and modify as required.

    Add 'C:\ti\mmwave_studio_02_01_00_00\mmWaveStudio\ReferenceCode\FTDILib\SourceCode\vs\mmwl_port_ftdi.vcxproj' to mmwavelink_example VS solution.

    FTDI SPI Clock is being set mmwl_port_ftdi.c->rlsInitSpiPort() function, you need to change the divider high/low value to change the SPI clock (max 10MHz).

    Change additional dependencies under linker->input for the updated library file in the mmwavelink_example project.

    Regards,

    Jitendra

  • Hi Jitendra,

    Thank you for the detailed explanation.
    I could add mmwl_port_ftdi.vcxproj to mmwavelink_example VS solution and changed additional dependencies.
    Then, I changed the SPI Clock divide setting of rlsInitSpiPort () function.

    However, after that, I don't know how to call the functions of mmwl_port_ftdi.c to make SPI communication.

    I referred to thread "AWR1243BOOST: AWR1243P Cascade, DCA1000 EVM, Datapipeline".
    I changed function MMWL_powerOnMaster (mmwavelink_example.c)

       clientCtx.comIfCb.rlComIfOpen = MMWL_spiOpen;
    to
      clientCtx.comIfCb.rlComIfOpen = rlsCommOpen;

    And then, I build this code, I get error "LNK2005 _rls_spiDeviceName is already defined in mmwlstudio.lib".
    Is this approach correct?
    Could you provide me a code example of mmwavelink_example that uses mmwl_port_ftdi.c for SPI communication?

    Regards,
    Hiroyuki

  • Hi Jitendra,

    Thank you for your advice.
    I could change the SPI clock frequency as follows:
     
    1. I added mmwl_port_ftdi.vcxproj to mmwavelink_example VS solution.
    2. I updated mmwavelink callbacks (rlClientCbs_t clientCtx) in the mmwavelink_example (MMWL_powerOnMaster) with the corresponded API provided in mmwl_port_ftdi.c.
     
    Regards,
    Hiroyuki