In XC5 board, how to change CPU frequency and baud rate?
The default oscillator is 20MHz, and COM port baud rate is 38400.
If you want to change current CPU frequency, the only way is to change oscillator.
The baud rate setting is dependent on oscillator.
User can change baud rate by setting ATFUART010 Baud Rate Divisor Latch LSB (DLL) register (default value is 24=0x18).
In AndeSight demo project, you may change it in uart_init() function of uart.c file. Note that this function is under CFG_LLINIT define.
/* DLL = 0x18 */
outw(UART_BASE + 0x00, 0x18);
For example: N705
Attachment:
xc5_freq.png [ 6.61 KiB | Viewed 12134 times ]