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.

DM6437 UART0 Interrut Questions(DSP/BIOS), Thanks

Other Parts Discussed in Thread: TMS320DM6437

Hi,
I am using TMS320DM6437 EVM for my project application, and I have some problems about UART0 interrupt.
Would you give me some suggestions?

I create a project to receive data from UART0 using interrupt, and make UART0 to worke in interrupt mode using DSP/BIOS. The settings are as follows:
...
bios.TSK.create("TSK_LedBlink");
bios.TSK.instance("TSK_LedBlink").order = 1;
bios.TSK.instance("TSK_LedBlink").comment = "Led Blink";
bios.TSK.instance("TSK_LedBlink").fxn = prog.extern("LedBlink");
bios.HWI.instance("HWI_INT5").fxn = prog.extern("UART0_ISR");
bios.HWI.instance("HWI_INT5").interruptSelectNumber = 84;
bios.HWI.instance("HWI_INT5").useDispatcher = 1;
...

I want to set receiver trigger level as 14 bytes, and modify the some code in 'evmdm6437_uart.c', the changes are listed bellow:

    uart_handle->regs->PWREMU_MGMT = 0; // Reset UART TX & RX components
    _wait(100);

    uart_handle->regs->DLL = (divisor & 0xff);  // Set baud rate
    uart_handle->regs->DLH = (divisor >> 8) & 0xff;
    
    //uart_handle->regs->FCR = 0x0007;   // Clear UART TX & RX FIFOs
    //uart_handle->regs->FCR = 0x0001;   // Enable TX & RX FIFOs 1-byte
    uart_handle->regs->FCR = 0x00C7;    // Clear UART TX & RX FIFOs
    uart_handle->regs->FCR = 0x00C1;    // Enable TX & RX FIFOs 14-byte


    uart_handle->regs->IER = 0x0007;      // Enable interrupts
    uart_handle->regs->LCR = 0x0003;    // 8-bit words,
                                                                         // 1 STOP bit generated,
                                                                         // No Parity, No Stick paritiy,
                                                                         // No Break control
    uart_handle->regs->MCR = 0x0000;    // RTS & CTS disabled,
                                                                         // Loopback mode disabled,
                                                                         // Autoflow disabled

    uart_handle->regs->PWREMU_MGMT = 0x6001;    // Emulation Free,
                                                                                                // Enable TX & RX componenets

If the settings are right, the UART0 interrupt will occur only when it has received 14 bytes, is that right? But when I send ONE byte character to DM6437 EVM using ComAsistant, the UART0 receiver interrupt occurs, and the program run into the UART0_ISR(). I don't konw why?

(1) I want to set trigger level as 14 bytes, How can I modify the file 'evmdm6437_uart.c'?

(2) If the trigger level has been setted as 14 bytes, How Can I access the FIFO buffer?
      Can I access the FIFO as follows?

    Uint32 *data;
    *data = uart_handle->regs->THR;
    *(data + 4) = *(&(uart_handle->regs->THR) + 4);
    *(data + 8) = *(&(uart_handle->regs->THR) + 8);
    *(data +12) = *(&(uart_handle->regs->THR) + 8) & 0xFFFF;  
 
    Is that right?

I am looking forward to your suggestions!

Sincerely yours
Michael Lee