Use the debug serial port as a common serial port
December 10, 2014
Navigation Guidance and Control laboratory
Reprint Please specify: Http://blog.csdn.net/wang_zheng_kai
Problems: The um220 module requires a serial port, and the Development Board does not have the use of free ports.
Problem Analysis:
The Mensa Development Board has a total of 4 UART functions as follows:
UART0: The port reserved for Bluetooth, if you want to use, you need to remove the WiFi module;
UART1, UART2: The re-use of the PIN, as the pin of the network port, the use of the need to remove DM9000;
UART3: As a debugging serial port, it can be used as a normal ports;
Solution:
The initialization of the serial port in the bootloader and kernel can be considered as two independent processes, since debugging we do not turn off the bootloader Debug serial port function.
Modify the kernel configuration and system configuration, the debug serial port is used as a normal serial port.
Implementation steps:
1, modify the configuration in the kernel:
Execute the Make Menuconfig command to cancel the console on JZ47XX and compatible serial port option;
Device Drivers--->
Characterdevices--->
Serialdrivers--->
<*>ingenic jz47xx Serial Port support
[] Console on JZ47XX and compatible SerialPort
[*] Enable uart0
2, modify the configuration in the Rootfs:
In the file system/etc/inittab:
# Put A Getty on the serial port
Ttys3::respawn:/sbin/getty-l ttyS3 57600 vt100 # generic_serial
Modified to:
#ttyS3:: Respawn:/sbin/getty-l ttyS3 57600 vt100 # generic_serial
3, recompile uimage and rootfs.ext2, burn and start the Development Board.
At this time after the bootloader start, plug in the um220 module's serial port, can complete the communication.
Note: Since the print log setting in bootloader is not changed, wait for the bootloader to start, then connect the serial port to prevent access to the bootloader configuration.
Use the debug serial port as a normal serial port (debug, test only)