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.

无法进入MibSPI 中断服务函数

Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN

你好,

TMS570LS3137,MibSPI1的回环模式自发自收。收发128个数据,配置TG0的buffer为0~127。非DMA方式。

程序设计流程:

初始化时,使能TG发送/挂起中断,并配置为level0。向TXRAM写入数据启动TG0发送。

 之后,在mibspi1HighLevelInterrupt()中断里,从RXRAM接收数据写入用户数据区。

我理解,TG0发送完成后,产生TG发送完成中断,即mibspi1HighLevelInterrupt()入口;但调试时发现,CPU无法进入mibspi1HighLevelInterrupt()中断函数,也就无法接受数据。不知道为什么无法进入中断?

附主函数:

void main(void)
{

    loadDataPattern(D_SIZE,&TX_DATA[0]);

    mibspi1Init();

/* - enabling loopback ( this is to emulate data transfer without external wires */
    mibspiEnableInternalLoopback(mibspiREG1);

    mibspiEnableGroupNotification(mibspiREG1,0,0);

    mibspiSetData(mibspiREG1, 0, TX_DATA);

/* - start the mibspi transfer tg 0 */
    mibspiTransfer(mibspiREG1,0);

    while(1); 

}

  • Hi Liang,

        中断不能响应,一般有三个地方需要注意,第一个是有没有使能模块中断,第二个是有没有使能VIM中断通道,第三个是有没有使能全局中断。

    根据你的描述,首先麻烦确认在HALCOGEN中有没有使能Channel12--MIBSPI1 level0,然后在main程序中加入_enable_IRQ(),使能全局中断。

    PS:注意Channel12 选择的是IRQ还是FIQ,若是FIQ,则用_enable_FIQ();


    如果还有问题,我们可以继续交流

    Ken