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.
我在vision_apps的vision_apps\platform\j721e\rtos\mcu2_0目录下main.c,里增加了SPI1的操作,但是整个进程会卡在SPI_open这里,无法执行下去,以下是我增加的操作的SPI的代码:
void spi_open(uint32_t instance,uint32_t domain) { SPI_Handle spi; SPI_Params spiParams; // uint32_t instance, domain; //domain = 1; //instance = 1; SPI_HWAttrs spi_cfg; appLogPrintf("spi_open instance=%d,domain=%d enter........\n",instance,domain); SPI_init(); SPI_socGetInitCfg(domain, instance, &spi_cfg); appLogPrintf("spi_open instance=%d,domain=%d spi_cfg.intNum=%d........\n",instance,domain,spi_cfg.intNum); spi_cfg.enableIntr = true; spi_cfg.edmaHandle = NULL; spi_cfg.dmaMode = FALSE; spi_cfg.chnCfg[0].dataLineCommMode = MCSPI_DATA_LINE_COMM_MODE_4; SPI_socSetInitCfg(domain, instance, &spi_cfg); SPI_Params_init(&spiParams); spiParams.transferMode = SPI_MODE_BLOCKING; spiParams.transferCallbackFxn = NULL; spiParams.frameFormat=SPI_POL0_PHA1; spiParams.transferTimeout = 0; spiParams.mode = SPI_MASTER; appLogPrintf("SPI_Params_init after........\n"); //memcpy(&spiParams,&SPI_defaultParams,sizeof(SPI_Params)); spi = SPI_open(domain, instance, &spiParams); if (spi == NULL) { appLogPrintf("Error initializing SPI\n"); // goto Err; } else { appLogPrintf("SPI_%d initializing......\n",instance); } }
从LOG来看是进入SPI_open后没有出来,能否帮忙看看是不是代码上有什么问题导致的?
SDK版本:ti-processor-sdk-rtos-j721e-evm-08_05_00_11