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.

LAUNCHXL-CC26X2R1: UART driver rx problems

Part Number: LAUNCHXL-CC26X2R1


Hello. I'm planning to implement uart in my project in Launchpad. Using the available driverlib of cc13x2_cc26x2 in SDK. I'm planning to use the standard UART settings where FIFO is disabled(which is i'm a litthle bit confused since there is only a single register for tx and rx data, UART DR) I tried transmitting single test byte and it works. 

//*****************************************************************************
//
// Waits to send a character from the specified port
//
//*****************************************************************************
void
UARTCharPut(uint32_t ui32Base, uint8_t ui8Data)
{
    // Check the arguments.
    ASSERT(UARTBaseValid(ui32Base));

    // Wait until space is available.
    while(HWREG(ui32Base + UART_O_FR) & UART_FR_TXFF)
    {
    }

    // Send the char.
    HWREG(ui32Base + UART_O_DR) = ui8Data;
}

I also tried the rx side by sending a single byte periodically every 500ms but no data is received. Flags is asserted one time but still no data can be read in DR register, after that it is caught on the while loop in next iteration. 

//*****************************************************************************
//
// Waits for a character from the specified port
//
//*****************************************************************************
int32_t
UARTCharGet(uint32_t ui32Base)
{
    // Check the arguments.
    ASSERT(UARTBaseValid(ui32Base));

    // Wait until a char is available.
    while(HWREG(ui32Base + UART_O_FR) & UART_FR_RXFE)
    {
    }

    // Now get the character.
    return(HWREG(ui32Base + UART_O_DR));
}

I tried enabling the rx interrupt to to identify the exact time to read the DR register (tx interrupt works fine). But as the interrupt is enabled, the program suddenly enters the interrupt handler without any mask interrupt asserted. Are there any settings I have missed, or did I have a mistake on implementation? Thanks for the help

PS. I'm not planning to use any rtos