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.

TMS320C6748: TMS320C6748的UART+DMA能否搭配UART中断实现超时接收

Part Number: TMS320C6748

void UART0Isr(void)
{
    uint32_t intStatus = UARTIntStatus(SOC_UART_0_REGS);
    IntEventClear(SYS_INT_UART0_INT);
    UARTIntDisable(SOC_UART_0_REGS, intFlag);
    UART0_CloseDMA();
    
    switch(intStatus)
    {
        // Timeout interrupt
        case UART_INTID_CTI:
        {
            while(TRUE == UARTCharsAvail(SOC_UART_0_REGS))
            {
                UARTCharGetNonBlocking(SOC_UART_0_REGS);
            }
            break;
        }
    
        // Receive error
        case UART_INTID_RX_LINE_STAT:
        {
            while(UARTRxErrorGet(SOC_UART_0_REGS))
            {
                UARTCharGetNonBlocking(SOC_UART_0_REGS);
            }
            break;
        }
    
        default:
        break;
    }
    
    UART0_OpenDMA();
    UARTIntEnable(SOC_UART_0_REGS, intFlag);
    return;
}

void UART0_DMA_Callback(unsigned int tccNum, unsigned int status)
{
    UART0_CloseDMA();
    memset(rcvBuf, 0, RX_BUFFER_SIZE);
    dmaFlags = 1;
}

想接收不定长数据,但是目前只有接收定长数据的UART+DMA;
尝试了一下开启串口超时中断与DMA传输,但是进不去UART回调函数,DMA回调函数也进不去。
代码如上。