This post is about UART baudrate configuration in LPC810.
FRG and BRG can be used to derive the desired baudrate.
BRG should produce output clock rate 16 times the desired baudrate. The input clock to BRG is BASECLK.
//Setup BRG LPC_USART0->BRG = MAINCLK / (16 * aBaudRate);
Output clock from FRG is common for all UART peripherals.
It is easier, if we set
UARTFRGDIV to 255.
//Set up FRG LPC_SYSCON->UARTFRGDIV = 0xFF; LPC_SYSCON->UARTFRGMULT = ((MAINCLK * 256) / (16 * aBaudRate * LPC_USART0->BRG)) - 256;
Setup clock to FRG
//Setup clock to FRG LPC_SYSCON->UARTCLKDIV = UARTCLKDIV;