Use the debug serial port as a common serial port (only for debugging and testing), and the serial port is limited
Use the debug serial port as a Common Serial Port
December 10, 2014
Navigation Guidance and Control Laboratory
Reprinted Please note: http://blog.csdn.net/wang_zheng_kai
Problem: serial ports are required for the um220 module, but the Development Board does not have any idle ports.
Problem Analysis:
The mensa Development Board has a total of four uarts. Its functions are as follows:
UART0: Port reserved for Bluetooth. If you want to use it, remove the wifi module;
UART1 and UART2: Reuse of pins. As the pin of the network port, DM9000 needs to be removed;
UART3: Used as the debugging serial port and can be used as a common port;
Solution:
The initialization of the serial port in the Bootloader and kernel can be considered as two independent processes. In view of the fact that the debug function of the bootloader is not disabled.
Modify the kernel configuration and system configuration, and use the debug serial port as a common serial port.
Steps:
1. modify the configuration in the kernel:
Run the make menuconfig command to cancel the Console on jz47xx and compatible serial port options;
Device Drivers --->
Characterdevices --->
Serialdrivers --->
<*> Ingenic jz47xx serial port support
[] Console on jz47xx and compatible serialport
[*] Enable uart0
2. modify the configuration in rootfs:
Run the following command in the/etc/inittab File System:
26 # Put a getty on the serial port
27 ttyS3: respawn:/sbin/getty-L ttyS3 57600 vt100 # GENERIC_SERIAL
To:
27 # ttyS3: respawn:/sbin/getty-L ttyS3 57600 vt100 # GENERIC_SERIAL
3. recompile uImage and rootfs. ext2, download and start the development board.
After the bootloader is started, plug in the serial port of the um220 module to complete the communication.
Note: The print log settings in bootloader are not changed. You need to connect to the serial port after bootloader is started to avoid entering the configuration of bootloader.