The UART internal functional clock is selected and divided from the functional clock of the IP.
- Use UARTx.CLKSEL register to select the source of the UART functional clock.
- BUSSCLK: the current bus clock is selected as the source for UART. The current bus clock depends on power domain. If the UART instance is in power domain 1 (PD1) refer to MCLK, if the UART instance is in power domain 0 (PD0) refer to ULPCLK.
- MFCLK: MFCLK is selected as the source for UART, refer to MFCLK.
- LFCLK: LFCLK is selected as the source for UART, refer to LFCLK
- Use UARTx.CLKDIV register to
select the divide ratio of the UART function clock,options are from divide by 1
to 8. For UART Extend, there is a CLKDIV2 register to further divide the UART
function clock to support the IrDA mode. When using IrDA mode, CLKDIV2.RATIO
must be set to 1h for proper IrDA clocking.
The selected source clock is always available and the frequency depends on the power mode, for more information, see the Clock Module (CKM) section. After enabling the UART module by setting the ENABLE bit, the module will be ready to start receiving and transmitting data.