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.

CCS/IWR1443BOOST: Help setting up SPI test program found in mmwave sdk 2.1

Part Number: IWR1443BOOST
Other Parts Discussed in Thread: AWR1642, IWR1443, MMWAVE-SDK

Tool/software: Code Composer Studio

I'm trying to set up SPI communication between two IWR1443BOOST devices. I found the test programs found in ti/mmwave_sdk_02_01_00_04/packages/ti/drivers/spi/test/xwr14xx, and want to use this to test that communication. Importing this project into CCS failed, so I ported the projectspec file included in the following post for the awr1642 to the iwr1443. The ported projectspec currently used is below:

<?xml version="1.0" encoding="UTF-8"?>

<projectSpec>
    <project
        name="spitest_mss_14xx"
        deviceFamily="ARM"
        isTargetManual="false"
        device="Cortex R.IWR1443"
        endianness="little"
        cgtVersion="16.9.6.LTS"
        connection="common/targetdb/connections/TIXDS110_Connection.xml"
        toolChain="TI"
        linkerCommandFile="mss_mmw_linker.cmd"
        preannouncebuildStep="Deleting old BIN format image"
        preBuildStep="rm -f ${PROJECT_ROOT}/xwr14xx_mmw.bin;"
        postannouncebuildStep="Preparing BIN format image"
        postBuildStep="${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/create_ConfigRPRC/create_ConfigRPRC.exe -s 0x00000006;${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/out2rprc/out2rprc.exe xwr14xx_mmw_mss.xer4f xwr14xx_mmw_mss.bin;${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/multicore_image_generator/MulticoreImageGen.exe LE 37 0x00000006 xwr14xx_mmw.bin 0xCF910000 xwr14xx_mmw_mss.bin 0xb5510000 ${COM_TI_MMWAVE_SDK_INSTALL_DIR}/firmware/radarss/xwr12xx_xwr14xx_radarss_rprc.bin; ${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/crc_multicore_image/crc_multicore_image.exe xwr14xx_mmw.bin xwr14xx_mmw.bin.tmp;${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/scripts/ImageCreator/append_bin_crc/gen_bincrc32.exe xwr14xx_mmw.bin;"
        description="spi driver test"
        launchWizard="false"
        configurations="Debug, Release"
        compilerBuildOptions="
        -mv7R4 --code_state=16 --float_support=VFPv3D16 -me -O3 -eo=.oer4f
        -I${PROJECT_ROOT}
        -I${CG_TOOL_ROOT}/include
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages
        -I${COM_TI_MMWAVE_SDK_INCLUDE_PATH}
        -D${COM_TI_MMWAVE_SDK_SYMBOLS}
        -D${BIOS_SYMBOLS}
        -DSOC_XWR14XX
        -DSUBSYS_MSS
        -DDOWNLOAD_FROM_CCS
        -DMMWAVE_L3RAM_NUM_BANK=6
        -DMMWAVE_SHMEM_TCMA_NUM_BANK=0
        -DMMWAVE_SHMEM_TCMB_NUM_BANK=0
        -DMMWAVE_SHMEM_BANK_SIZE=0x10000
        -DDebugP_ASSERT_ENABLED
        -D_LITTLE_ENDIAN
        -g --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --enum_type=packed --abi=eabi"
        linkerBuildOptions="
        -mxwr14xx_mmw_mss.map -oxwr14xx_mmw_mss.xer4f
        -I${COM_TI_MMWAVE_SDK_LIBRARY_PATH}
        -I${CG_TOOL_ROOT}/lib
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/control/mmwave/lib
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/control/mmwavelink/lib
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/crc/lib
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/dma/lib
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/esm/lib
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/gpio/lib
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/mailbox/lib
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/osal/lib
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/pinmux/lib
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/soc/lib
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/uart/lib
		-I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/drivers/spi/lib
        -I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/utils/cli/lib
		-I${COM_TI_MMWAVE_SDK_INSTALL_DIR}/packages/ti/utils/testlogger/lib
        -llibosal_xwr14xx.aer4f
        -llibesm_xwr14xx.aer4f
        -llibgpio_xwr14xx.aer4f
        -llibsoc_xwr14xx.aer4f
        -llibpinmux_xwr14xx.aer4f
        -llibcrc_xwr14xx.aer4f
        -llibdma_xwr14xx.aer4f
        -llibuart_xwr14xx.aer4f
        -llibmailbox_xwr14xx.aer4f
        -llibmmwavelink_xwr14xx.aer4f
        -llibmmwave_xwr14xx.aer4f
        -llibcli_xwr14xx.aer4f
		-llibtestlogger_xwr14xx.aer4f
		-llibspi_xwr14xx.aer4f
        --define=MMWAVE_L3RAM_NUM_BANK=6
        --define=MMWAVE_SHMEM_TCMA_NUM_BANK=0
        --define=MMWAVE_SHMEM_TCMB_NUM_BANK=0
        --define=MMWAVE_SHMEM_BANK_SIZE=0x10000
        --reread_libs --diag_warning=225 --diag_wrap=off --display_error_number --warn_sections --xml_link_info=xwr14xx_mmw_linkInfo.xml --rom_model --unused_section_elimination=on --disable_auto_rts -lrtsv7R4_T_le_v3D16_eabi.lib">

        <!-- Project properties -->
        <property name="type" value="rtsc"/>
        <property name="products" value="com.ti.rtsc.SYSBIOS:6.53.02.00;com.ti.MMWAVE_SDK:2.1.0.04;"/>
        <property name="xdcToolsVersion" value="3.50.04.43_core"/>
        <property name="target" value="ti.targets.arm.elf.R4F"/>
        <property name="platform" value="ti.platforms.cortexR:IWR14XX:false:200"/>
        <property name="endianness" value="little"/>
        <property name="output_format" value="elf"/>
        <property name="buildProfile" value="release"/>

        <!-- Project files -->
        <file path="COM_TI_MMWAVE_SDK_INSTALL_DIR/packages/ti/drivers/spi/test/xwr14xx/main.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
        <file path="COM_TI_MMWAVE_SDK_INSTALL_DIR/packages/ti/drivers/spi/test/xwr14xx/mss.cfg" openOnCreation="false" excludeFromBuild="false" action="copy"/>
        <file path="COM_TI_MMWAVE_SDK_INSTALL_DIR/packages/ti/drivers/spi/test/common/test_common.c" openOnCreation="false" excludeFromBuild="false" action="copy"/>
        <file path="COM_TI_MMWAVE_SDK_INSTALL_DIR/packages/ti/drivers/spi/test/common/test_common.h" openOnCreation="false" excludeFromBuild="false" action="copy"/>
        <file path="COM_TI_MMWAVE_SDK_INSTALL_DIR/packages/ti/drivers/spi/test/xwr14xx/mss_spi_linker.cmd" openOnCreation="false" excludeFromBuild="false" action="copy"/>
        <file path="COM_TI_MMWAVE_SDK_INSTALL_DIR/packages/ti/platform/xwr14xx/r4f_linker.cmd" openOnCreation="false" excludeFromBuild="false"/>

    </project>
</projectSpec>

The code successfully compiles, loads, and runs on the device. However, from the console output while setup is successful, any test involving SPI_transfer of data fails "Debug: SPI_transfer with data size = 1 failed with error=6.". Console output is shown below, for a test instance where only gXWR1xxxSlaveWithFTDITest and gXWR1xxxSlaveWithXWR1xxx were set to true:

More broadly, how should this test be run? There are two IWR1443BOOST devices connected to each other. Presumably one runs a slave configuration while the other runs master. Should the programs be run on both devices simultaneously? How does the driver account for the timing between devices?

 

  • Hi Elizabeth,

    ProjectSpec files are included for the entire mmWave-SDK demo and not for the individual drivers.

    If you are looking to run the test you will want to import the files in the folder of the SPI driver and run the xwr14xx_spi_mss.xer4f executable on your device.

    Have you consulted the Doxygen? There is additional documentation available at this location: /mmwave_sdk_02_01_00_04/packages/ti/drivers/spi/docs/doxygen/html/index.html


    Cheers,
    Akash
  • >>"ProjectSpec files are included for the entire mmWave-SDK demo and not for the individual drivers."

    This was the motivation for creating a new projectspec file which would run the files found for the SPI driver test (\ti\mmwave_sdk_02_01_00_04\packages\ti\drivers\spi\test\xwr14xx). In referencing the post which contained the projectspec file we modified (), Nitin stated: "The test is compiled using a makefile: mmwave_sdk_01_02_00_05\packages\ti\drivers\spi\test\xwr16xx , but it should be straightforward to copy one of the existing CCS projects and modify it for the project you're trying to compile." This is what we chose to do in modifying their projectspec. The projectspec is created to have a project from which to run the test, not just initialize the driver.

    >>"If you are looking to run the test you will want to import the files in the folder of the SPI driver and run the xwr14xx_spi_mss.xer4f executable on your device."

    Yes- this is the process we have been following. The CCS project creates an xer4f executable which we then load to the device. However, SPI is a communication protocol. For the data transfer tests to work (assuming the test is meaningful), the device must be talking to something. This was also indicated by the test variables:  gXWR1xxxSlaveWithXWR1xxx , which test communication between one IWR and another. My question regards the timing and physical setup of this test, with two devices.

    First, I am correct in loading one device with the 'gXWR1xxxMasterWithXWR1xxx' boolean set to true, and the other with 'gXWR1xxxSlaveWithXWR1xxx' set to true (thus far each device is loaded by a different computer/CCS workspace)?

    When the executable is run on the device, the console output appears as the tests are done, over the course of a couple seconds. I want to fix the tests which fail: "Debug: SPI_transfer with data size = 1 failed with error=6" "Debug: SPI_transfer with - data size = 11 failed with error=6" "Debug: SPI_transfer failed with NULL pointers for both TX and RX"    What is error=6?

    Every test which regards the actual transfer of data fails in every configuration thus far attempted. For data to transfer successfully it must presumably be sent to something which would send it back. If the primary device runs the 'gXWR1xxxMasterWithXWR1xxx' test, how should the slave device be configured? Which tests should be toggled? How should they be triggered such that the slave is ready and operational when the Master tests happen?

    >>"Have you consulted the Doxygen? There is additional documentation available at this location: /mmwave_sdk_02_01_00_04/packages/ti/drivers/spi/docs/doxygen/html/index.html"

    I am entirely inexperienced in navigating Doxygen documentation. When I open the index.html page, I get an explanation of the overall driver. Because my issues are in this case centered around the operation of the spi_test file itself, how do I navigate to a Doxygen page which addresses spi test's main.c directly (E:\ti\mmwave_sdk_02_01_00_04\packages\ti\drivers\spi\test\xwr14xx\main.c or related files)? The output in my previous post indicated that the SPI_transfer can be opened and closed successfully, and all API tests pass. I believe that the issue is in the communication connection between the two devices, not the operation of the SPI driver in either device.

  • Hi Elizabeth,

    If you are modeling after projectSpec files then I'd recommend using the mmWave-SDK 2.1 where the ProjectSpec was changed including a post-build change for ES3.0 devices.

    The Doxygen is going to be your primary guide for configuring the SPI Driver (both Master and Slave) as the required parameters are all shown here.


    Cheers,
    Akash