TI中文支持网
TI专业的中文技术问题搜集分享网站

TMS320F28377S: SPI通讯中断触发不了

Part Number:TMS320F28377S

如下面配置,中断触发不了

EALLOW;
PieVectTable.SPIA_RX_INT = &spiRxFifoIsr;
PieCtrlRegs.PIECTRL.bit.ENPIE = 1; // Enable the PIE block
PieCtrlRegs.PIEIER6.bit.INTx1 = 1;
IER |= M_INT6; // Enable group 9 interrupts
EDIS;

SpiaRegs.SPIFFTX.all = 0xC042; // Enable FIFOs, set TX FIFO level to 4
SpiaRegs.SPIFFRX.all = 0x4070; // Set RX FIFO level to 4
SpiaRegs.SPIFFCT.all = 0x00;
SpiaRegs.SPIFFRX.bit.RXFFIENA = 1;

// Initialize SPI-A
SpiaRegs.***.all = 0x0007;

SpiaRegs.***.all = 0x000E;
SpiaRegs.***.bit.SPIINTENA = 1;
SpiaRegs.***.bit.OVERRUNINTENA = 1;

// Set the baud rate
SpiaRegs.SPIBRR.bit.SPI_BIT_RATE = 0x7F;

// Set FREE bit
// Halting on a breakpoint will not halt the SPI
SpiaRegs.SPIPRI.bit.FREE = 1;

// Release the SPI from reset
SpiaRegs.***.bit.SPISWRESET = 1;
SpiaRegs.SPIFFTX.bit.TXFIFO=1;
SpiaRegs.SPIFFRX.bit.RXFIFORESET=1;

Green Deng:

有没有单步运行过?程序会卡在哪句代码 吗?

,

user6324869:

解决了,有中断没打开,谢谢

赞(0)
未经允许不得转载:TI中文支持网 » TMS320F28377S: SPI通讯中断触发不了
分享到: 更多 (0)