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?