Skip to content

USCI-UART #53

@jeromeDms

Description

@jeromeDms

Hi
I'm using USCI0 as UART, 31250 kb/sec (low speed) on M484KIDAE
Everything works fine when sending single bytes.
Anyway, I'm trying to send multiple bytes in a loop, and only the first one is sent.

The following does not work, it sends only the first byte

for(;;) {
   isUartTxFull = UUART_GET_TX_FULL(UUART0);
   if(isUartTxFull == 0) {
        UUART0->TXDAT = myData8b;
   }
}

The following works, it sends all bytes, but waiting buffer empty is not applicable in my app.

for(;;) {
   isUartTxEmpty = UUART_IS_TX_EMPTY(UUART0);
   if(isUartTxEmpty == 1) {
        UUART0->TXDAT = myData8b;
   }
}

UUART_GET_TX_FULL() returns 0 but adding one more byte in the buffer does nothing.

I found In the TRM of M480 the following on page 1547 :

  1. Transmit and receive data.
  • Write transmit data register UUART_TXDAT to transmit data.
  • Wait until TXSTIF(UUART_PROTSTS[1]) is set and then user can write the next data in
    UUART_TXDAT.

I tried testing the TXSTIF before writing the next byte but it does not help.
Also, the USCI UART examples in the BSP are not testing this bit.

Thanks for any help you can provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions