Hi,
Yes, it is possible.
All three USARTs use a common peripheral clock (U_PCLK) and, if needed, a fractional baud rate generator.
In asynchronous mode, it is necessary to configure the baud rate divider BRGVAL in the USARTn BRG register and the serial clock is Un_SCLK.
If you are using the SDK, this funtion initializes the USART configuration structure to a default value. The default values are:
* usartConfig->baudRate_Bps = 9600U;
* usartConfig->parityMode = kUSART_ParityDisabled;
* usartConfig->stopBitCount = kUSART_OneStopBit;
* usartConfig->bitCountPerChar = kUSART_8BitsPerChar;
* usartConfig->loopback = false;
* usartConfig->enableTx = false;
* usartConfig->enableRx = false;
void USART_GetDefaultConfig(usart_config_t *config)
{
/* Check arguments */
assert(NULL != config);
/* Initializes the configure structure to zero. */
memset(config, 0, sizeof(*config));
/* Set always all members ! */
config->baudRate_Bps = 9600U;
config->parityMode = kUSART_ParityDisabled;
config->stopBitCount = kUSART_OneStopBit;
config->bitCountPerChar = kUSART_8BitsPerChar;
config->loopback = false;
config->enableRx = false;
config->enableTx = false;
config->syncMode = kUSART_SyncModeDisabled;
config->enableContinuousSCLK = false;
config->clockPolarity = kUSART_RxSampleOnFallingEdge;
}
So you can modify it according to your needs, for example:
USART_GetDefaultConfig(&config);
config.enableRx = true;
config.enableTx = true;
config.baudRate_Bps = 115200;
/* Initialize the USART with configuration. */
USART_Init(USART1, &config, EXAMPLE_USART_CLK_FREQ);
I hope this helps,
Have a nice day!