4/29/2020
Godson 3A1000 Processor User Manual
110
124
Page 137
Godson 3A1000 Processor User Manual Part 2
12 Serial port configuration and use
12.1 Optional serial port
As a communication interface, serial port is mainly used for system debugging. The working principle is to configure the serial port baud
Registers related to rate, data bits, stop bits, and parity bits enable the serial port to send and receive bytes bit by bit.
There are currently two types of UART available on the 3A1000: one type is the UART of the CPU, there are UART0 and UART1,
The base address of the serial register of UART0 is 0xbfe001e0, the base address of the serial register of UART1 is 0xbfe001e8
The baud rate is 115200; there is another type of LPC UART, whose base address is 0xbff003f8, and the baud rate is 57600.
In the setting, the data bits are set to 8 bits, the stop bit is 1 bit, no parity, no flow control.
12.2 Serial configuration of PMON
In pmon, the macro USE_LPC_UART is used to distinguish the above two types of serial ports. The setting of pmon mainly involves
And the files are start.S and tgt_machdep.c.
The following takes the UART0 of the CPU as an example. First, there is a function to initialize the serial port in pmon start.S (register
For the use of the controller, see the UART controller section):