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.

TDA4VM: mcu2_0使用mainspi无法打开SPI

Part Number: TDA4VM

我在vision_apps的vision_apps\platform\j721e\rtos\mcu2_0目录下main.c,里增加了SPI1的操作,但是整个进程会卡在SPI_open这里,无法执行下去,以下是我增加的操作的SPI的代码:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

从LOG来看是进入SPI_open后没有出来,能否帮忙看看是不是代码上有什么问题导致的?

SDK版本:ti-processor-sdk-rtos-j721e-evm-08_05_00_11

x 出现错误。请重试或与管理员联系。