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.

IWR6843: Communication between IWR6843 & MSP430 via SPI/I2C

Part Number: IWR6843
Other Parts Discussed in Thread: IWR1443, TIDEP-0091, CCSTUDIO

I want to test SPI & I2C function of IWR6843 by connecting it to MSP430. Then send data from MSP430 to PC via UART. I haven't found the device code in the SDK for these 2 stages. Let IWR6843 is Master and MSP430 is a Slave.

1. I don't see USB port on MSP430 launchpad, how to connect it to PC via USB?

2. Do I need to burn code to both IWR6843 MCU and MSP430 separately? Please instruct me in details.

  • Hi Hector,

    You will need two separate code sets for each your MSP430 and IWR6843 devices. I am with the mmWave team and can assist you with your IWR6843 queries, for questions about the MSP430 Launch Pad you should open up an new thread with the part number of that launchpad.

    There is an example set of code you will find useful in the TIDEP-0091 software files. This solution uses the MSP432 Launchpad to control an IWR1443 radar sensor. The IWR1443 sensor takes a single measurement, processes the radar data to determine the range of three objects, and then transmits the post-processed result over to the MSP432 Launchpad via SPI. Lastly the MSP432 Launchpad transmits this data over UART to the PC for viewing.

    I believe this is example set of code is very close to what you are looking for. Despite the differences in device and SDK, the UART, SPI, and I2C drivers are all largely similar.

    Let me know if you have more questions.

    Regards,

    AG

  • Hi Akash,

    I see MSP430 Launchpad does not have USB port, only has TXD,RXD pins. So we can't connect directly to USB port on it but have to solder wires to TXD,RXD pins?

  • Hi Akash,

    I checked MSP430 Launchpad and don't see USB port, but MSP432 has. Anyways, do you recommend me use FTDI IC instead of MSP432 ?

  • Hi Akash,

    I checked MSP430 Launchpad and don't see USB port, but MSP432 has. Anyways, do you recommend me use FTDI IC instead of MSP432 ?

    I want to ask about IWR6843 device code and pinmux. After finished pinmux settings, i downloaded 3 files, the .c file defined pins as below

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    /* SPIA_MOSI */
    //Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PIND13_PADAD, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
    Pinmux_Set_FuncSel(SOC_XWR68XX_PIND13_PADAD, SOC_XWR68XX_PIND13_PADAD_SPIA_MOSI);
    /* SPIA_MISO */
    //Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINE14_PADAE, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
    Pinmux_Set_FuncSel(SOC_XWR68XX_PINE14_PADAE, SOC_XWR68XX_PINE14_PADAE_SPIA_MISO);
    /* SPIA_CLK */
    //Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINE13_PADAF, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
    Pinmux_Set_FuncSel(SOC_XWR68XX_PINE13_PADAF, SOC_XWR68XX_PINE13_PADAF_SPIA_CLK);
    /* SPIA_CS */
    //Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINE15_PADAG, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
    Pinmux_Set_FuncSel(SOC_XWR68XX_PINE15_PADAG, SOC_XWR68XX_PINE15_PADAG_SPIA_CSN);
    /* SPI_HOST_INTR - not used, reference code */
    //Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINP13_PADAA, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
    Pinmux_Set_FuncSel(SOC_XWR68XX_PINP13_PADAA, SOC_XWR68XX_PINP13_PADAA_SPI_HOST_INTR);

    1. Why did it comment Pinmux_Set_OverrideCtrl? 

    2. What's the function of Pinmux_Set_OverrideCtrl and Pinmux_Set_FuncSel? Does SPI/I2C work if I remove OverrideCtrl function?

    3. If I want to use SPI/I2C, I need to connect to FTDI_USB port on IWR6843 EVM, right?

    4. I see in the TI drivers -> SPI folder -> test_common.c has a function SOC_SPIOutputCtrl(socHandle, 0U, 1U, &errCode).

    But I can't find any declaration of it, so I don't know what 0U, 1U are. Please tell me more details.

  • Hi Akash,

    I checked TI SDK and have seen several files for SPI test. So I'm wondering which file is suitable for SPI testing with MSP432 among those files?

    1. C:\ti\mmwave_sdk_03_03_00_03\packages\ti\drivers\spi\test\windows\spiTest.cpp

    2. C:\ti\mmwave_sdk_03_03_00_03\packages\ti\drivers\spi\test\common\test_common.c

    3. C:\ti\mmwave_sdk_03_03_00_03\packages\ti\drivers\spi\test\xwr68xx\main.c

  • Hi Hector,

     The main.c would be your best route. Without any edits you can load the .xe** executable files that are included. If you are looking to edit the code you will need to set your environment and run a gmake clean then gmake all. Lastly if you are looking to step through the code via CCSTUDIO debugger, then you should remove the O3 optimizations from your make file.

    With all that being said if you need clarification just let me know.

    Regards,

    AG

  • HI Akash,

    What's O3 optimizations? When do we need O3 optimization?

    How to remove it?