3.7 Setting the UART Baud Rate
(Ask a Question)The value of the BAUD_VALUE_115200
macro in the hw_platform.h
file must be defined according to the system clock frequency to achieve the UART baud rate of 115200. The baud value is calculated using the following formula.
BAUD_VALUE = (CLOCK / (16 * BAUD_RATE)) - 1
To define the system clock frequency:
Look for #define SYS_CLK_FREQ
statement in the hw_platform.h
file.
Define it as:
#define SYS_CLK_FREQ 83333000UL
The SYS_CLK_FREQ value must be same as that of the clock generated in the design.
The following figure shows the system clock frequency definition.
