Andes Workshop
http://forum.andestech.com/

ADP-XC5, how to change CPU frequency and baud rate?
http://forum.andestech.com/viewtopic.php?f=13&t=767
Page 1 of 1

Author:  ianfeng [ Mon Dec 23, 2013 11:59 am ]
Post subject:  ADP-XC5, how to change CPU frequency and baud rate?

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
xc5_freq.png [ 6.61 KiB | Viewed 10795 times ]

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/