As per the data sheet of TDA4VM --> /* MCSPI3 and MCSPI4 include internal connectivity to MCSPI modules in the MCU domain, as follows: MCSPI3 is connected as a master to MCU_MCSPI1 by default at power-up. MCU_MCSPI1 and MCSPI3 may be optionally mapped to external device pads. MCSPI4 is directly connected as a slave to MCU_MCSPI2 by default at power-up. MCSPI4 and MCU_MCSPI2 are not pinned out externally. */ Instance 3 is for mpu1_0 as master and instance 1 is for mcu1_0 as slave --> The changes I made in file "main_mcspi_slave_mode.c" are --> /********************************************************************** static uint32_t SPI_test_get_instance (uint32_t testId, bool master) { uint32_t instance; /* Soc configuration structures indexing starts from 0. If the IP * instances start with 1, to address proper Configuration * structure index, McSPI Instance should be substracted with 1 */ if (master == (bool)true) { instance = (uint32_t)BOARD_MCSPI_MASTER_INSTANCE - 1; } else { instance = (uint32_t)BOARD_MCSPI_SLAVE_INSTANCE - 1; } #if defined (SOC_AM65XX) || defined(SOC_J721E) || defined(SOC_J7200) /* * For AM65XX/J721E/J7200 SoC, master/slave test is set up to use * McSPI 2 on the MCU domain for master and McSPI 4 on the * Main domain for slave, for loopback test it uses default * board McSPI instance */ if (testId < SPI_TEST_ID_LOOPBACK) { if (master == true) { instance = 3U; //changes done to make mpu1_0 as mater // instance = 2U; } else { instance = 1U; //changes done to make mcu1_0 as slave // instance = 4U; } if ((testId == SPI_TEST_ID_TIMEOUT) || (testId == SPI_TEST_ID_TIMEOUT_POLL)) { /* * Timeout test is done in slave mode, * on the McSPI 2 on MCU domain */ instance = 1U; } } #endif return (instance); } /********************************************************************************************************** The changes made in makefile at location "ti-processor-sdk-rtos-j721e-evm-07_03_00_07/pdk_jacinto_07_03_00_29/packages/ti/drv/spi/example/mcspi_slavemode" /********************************************************************************************************************* ifeq ($(CORE), mpu1_0) # Slave running on mpu1_0 core #CFLAGS_SPI_MS = -DMCSPI_SLAVE_TASK <----------------------- COMMENTED THIS #APP_MASTER_SLAVE = Slave <----------------------- COMMENTED THIS CFLAGS_SPI_MS = -DMCSPI_MASTER_TASK <----------------------- LINES CHANGED APP_MASTER_SLAVE = Master <----------------------- LINES CHANGED ifeq ($(SOC),$(filter $(SOC), am65xx)) # Slave uses local linker command file to avoid code/data memory conflict with master application EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_INSTALL_PATH)/ti/drv/spi/example/mcspi_slavemode/am65xx/linker_mpu.lds endif else # Master running on mcu1_0 core, use the common linker command file in build #CFLAGS_SPI_MS = -DMCSPI_MASTER_TASK <----------------------- COMMENTED THIS #APP_MASTER_SLAVE = Master <----------------------- COMMENTED THIS CFLAGS_SPI_MS = -DMCSPI_SLAVE_TASK <----------------------- LINES CHANGED APP_MASTER_SLAVE = Slave <----------------------- LINES CHANGED ifeq ($(SOC),$(filter $(SOC), j721e j7200)) # Slave uses local linker command file to avoid code/data memory conflict with master application ifeq ($(IS_BAREMETAL),yes) EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_INSTALL_PATH)/ti/drv/spi/example/mcspi_slavemode/$(SOC)/linker_mcu.lds else EXTERNAL_LNKCMD_FILE_LOCAL = $(PDK_INSTALL_PATH)/ti/drv/spi/example/mcspi_slavemode/$(SOC)/linker_mcu_sysbios.lds endif endif ************************************************************************************************************************/