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.

6747 串口接收中断

Other Parts Discussed in Thread: TMS320C6747

大家好,我最近在用TMS320C6747时,调试串口uart0接收中断时,发现中断服务函数有时候能进入,而多数时候无法进入。不知原因在哪里?已经不知道从哪里进行调试了,想请各位高手指点迷津。

串口初始化函数如下:

uart->PWREMU_MGMT = 0x0000;  //归零
    delay(10, 10);
   
    uart->LCR_reg = 0x83;   //DLL/DLH allowed
    uart->DLL_reg = (DSP_CLK/16/baud)&0xFF;
    uart->DLH_reg = ((DSP_CLK/16/baud)>>8)&0xFF;
    uart->LCR_reg = 0x03;   //RBR THR IER --allowed  8位 1stopbit

    uart->IIR_FCR = 0x87; //接收FIFO触发水平 8byte--清空接收和发送寄存器
    uart->IIR_FCR = 0x81;//接收和发送寄存器-no effect
   
    uart->IER_reg = IER_VALUE;//Receiver data available interrupt and character timeout indication interrupt is enabled.
    uart->LSR_reg &= ~0x01;   //LSR 只读
    uart->MCR_reg = MCR_VALUE;//Autoflow control 等失能  禁止RTSCTS

    uart->PWREMU_MGMT = 0x6001;  //Free-running mode is enabled; UART continues to run normally
                                 //接收发送使能
    dummy = uart->RBR_THR;

中断初始化函数如下:

void INT_UART_init()
{
 IRQ_setVecs((void*)0x806000);
 IRQ_globalEnable();
 IRQ_nmiEnable();
 CSR |= 0x00;

 *(int *)INTMUX2 =   0x0026 | 0x00002E | 0x00000045;     
            // uart     0     1      2
            // int     13    14     15        

 IER |= 0xE000;    //enable int13  14 15

中断服务函数进入之后执行判断 if((uart->LSR_reg&0x01)==0x01);

不知道以上的问题可能的原因是什么?敬请高手们的指点。谢谢