Infineon MOTIX™ MCU TLE988x/9x Device Family SDK
Data Structures | Typedefs | Functions
uart.c File Reference
Include dependency graph for uart.c:

Data Structures

union  UARTx_BCON
 

Typedefs

typedef union UARTx_BCON tUARTx_BCON
 

Functions

sint8 UARTx_setBaudrate (uint32 u32_baudrate, volatile tUARTx_BCON *tp_baudrateReg)
 Set the baudrate for UART0/UART1. More...
 
sint8 UART0_init (void)
 Initialize UART0. More...
 
sint8 UART1_init (void)
 Initialize UART1. More...
 
uint32 UART0_getBaudrate (void)
 Get the baudrate for UART0 Transform equation (SCU_fUART_MHz * 1000000 / (16 * (1U << (uint8)UART0->BCON.bit.BR_PRE) * (UART0->BCON.bit.BG_BR_VALUE + (UART0->BCON.bit.BG_FD_SEL / 32)))) to ((SCU_fUART_MHz * 1000000 * 2 ) / ((1U << (uint8)UART0->BCON.bit.BR_PRE) * (32 * UART0->BCON.bit.BG_BR_VALUE + (UART0->BCON.bit.BG_FD_SEL)))) More...
 
uint32 UART1_getBaudrate (void)
 Get the baudrate for UART1 Transform equation (SCU_fUART_MHz * 1000000 / (16 * (1U << (uint8)UART1->BCON.bit.BR_PRE) * (UART1->BCON.bit.BG_BR_VALUE + (UART1->BCON.bit.BG_FD_SEL / 32)))) to ((SCU_fUART_MHz * 1000000 * 2 ) / ((1U << (uint8)UART1->BCON.bit.BR_PRE) * (32 * UART1->BCON.bit.BG_BR_VALUE + (UART1->BCON.bit.BG_FD_SEL)))) More...
 
sint8 UART0_setBaudrate (uint32 u32_baudrate)
 Set the baudrate for UART0. More...
 
sint8 UART1_setBaudrate (uint32 u32_baudrate)
 Set the baudrate for UART1. More...
 
void UART0_setTXIntSts (void)
 
void UART0_setRXIntSts (void)
 
void UART0_setSyncErrIntSts (void)
 
void UART0_setEOFIntSts (void)
 
void UART1_setTXIntSts (void)
 
void UART1_setRXIntSts (void)
 
void UART1_setSyncErrIntSts (void)
 
void UART1_setEOFIntSts (void)
 

Typedef Documentation

◆ tUARTx_BCON

typedef union UARTx_BCON tUARTx_BCON

Function Documentation

◆ UART0_setEOFIntSts()

void UART0_setEOFIntSts ( void  )

◆ UART0_setRXIntSts()

void UART0_setRXIntSts ( void  )

◆ UART0_setSyncErrIntSts()

void UART0_setSyncErrIntSts ( void  )

◆ UART0_setTXIntSts()

void UART0_setTXIntSts ( void  )

◆ UART1_setEOFIntSts()

void UART1_setEOFIntSts ( void  )

◆ UART1_setRXIntSts()

void UART1_setRXIntSts ( void  )

◆ UART1_setSyncErrIntSts()

void UART1_setSyncErrIntSts ( void  )

◆ UART1_setTXIntSts()

void UART1_setTXIntSts ( void  )

◆ UARTx_setBaudrate()

sint8 UARTx_setBaudrate ( uint32  u32_baudrate,
volatile tUARTx_BCON tp_baudrateReg 
)

Set the baudrate for UART0/UART1.

The maximum allowed deviation is 2.5%. Otherwise return error code ERR_LOG_CODE_PARAM_OUT_OF_RANGE

Parameters
u32_baudratebaudrate
tp_baudrateRegbaudrate pointer to baudrate configuration register
Returns
sint8 0: success, <0: error codes
Note
The resulting SFR values might deviate from a configuration with the ConfigWizard or from User Manual examples. Some specific baudrates can be achieved with different SFR settings.