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.

cc3200 uart give interrupt for 2 character (not for single)

Other Parts Discussed in Thread: CC3200

Hi

I am initializing UART interrupt as below:

------

void UART_Irq() {

UARTIntClear(CONSOLE, UARTIntStatus(CONSOLE, TRUE));
osi_SyncObjSignal(&semUartRx);

}

void INIT_UART() {

osi_SyncObjCreate(&semUartRx);

UARTIntRegister(CONSOLE, UART_Irq);

UARTFIFOLevelSet(CONSOLE, UART_FIFO_TX1_8, UART_FIFO_RX1_8);

UARTIntEnable(CONSOLE, UART_INT_RX);

}

------

But it seems that I get interrupt for every 2 characters received.

I actually wanted it to interrupt for every characters pressed.

It kind of suggests that FIFO size is 16 bytes???

Where am I doing wrong?

Regards,

Shashi.

  • Hi Shashi,

    You are right, the UART FIFO is 16 bytes deep, and the minimum level for RX interrupt you can set is 2 bytes (or characters).

    If you want to get an interrupt every byte/character, you can use Receive Timeout (RT) interrupt.

    Please refer to CC3200 TRM section 6.2.3.3 Interrupts more details.

    Thanks and Regards,
    Praveen
  • Hi,

    Do you have the programming sequence to initialize the timeout interrupt? I didn't find that in the section. It only mentions that it is there.

    But which register?

    (I am not using DMA).

    Regards,
    Shashi.
  • Hello Shashi,

    The TIMEOUT Interrupt can be accessed by first setting the Mask bit in the UARTIM register. Then in the interrupt handler you need to make sure that on reading the status you read the UARTDR till the FIFO is not empty. This way by having any other threshold programmed you can still clear of the RXFIFO.

    Regards
    Amit