1.) Is "FUART" of the expression "FUART / (16 * BR) = IBRD + FBRD", as described in "13.4 Configuration" of the Apollo2 datasheet, the clock frequency (max. 24 MHz) selected by UARTx_ CR_CLKSEL?
2.) How can the value to be set in the FBRD Register be determined from FBRD in the above formula?
3.) When FUART = 24 MHz and BR = 921600 bps, how much is the error rate?
1.) In this expression, FUART is the frequency of the UART clock, BR is the desired baud rate, IBRD is the integer portion of the baud rate divisor, and FBRD is the fractional portion of the baud rate divisor. AmbiqSuite SDK sets FUART to 24MHz by default. It is possible to set lower FUART for lower power consumption, but this may result in larger baud rate error.
2.) For the example with 921600 bps baud rate from 24 MHz FUART, the left side of the expression becomes 24(10^^6) / (16*921000), which is 1.6276. Therefore, the IBRD = 1 and the 6-bit FBRD = rounded(.6276*64) = 40, or 0x28.
3.) For 921600 bps baud rate from 24 MHz FUART, the actual baud rate, BRACTUAL, can be calculated by: 24(10^^6) / (16*BRACTUAL) = 1 + (40/64), or 923077 bps, and the error due to the rounding for the fractional divider is 0.16%.