MTK Android Driver:uart

Source: Internet
Author: User

1.uart port configuration:The UART log and meta configuration ports are configured as other ports, and the vacated uart1 are specifically used for this functional communication debugging. Note: Only the UART1 port on the hardware board is able to fly the line out to debug. Modification method: reference: [FAQ07420] How to set the UART port to spit UART logPrevious versions of JB5.MP:alps/medaitek/custom/[$project]/preloader/inc/cust_bldr.h #define CFG_UART_LOG (UART4)//(UART1) #define CFG_UART_META (UART4)//(UART1) version after jb5.mp:alps\mediatek\custom\ $project \preloader\cust_bldr.mak cfg_uart_log: =uart4 #UART1 Cfg_uart_meta: =uart4 #UART1
2. Raise the permission of the UART port, also take UART1 as an example alps/medaitek/config/[$project]/init.project.rc, add:chmod 0666/dev/ttymt0chown System System/dev/ttymt0
the UART physical port corresponds to the system device name:uart1--/dev/ttymt0 UART2--/DEV/TTYMT1uart3--/dev/ttymt2Uart4--/dev/ttymt3
3. Platform-related SerialPort API code:Top apk:Alps\frameworks\base\core\java\android\hardware\serialport.javaJNI Definition:Alps\frameworks\base\core\jni\android_hardware_serialport.cpp
4. Test method:1.) Confirm that the required settings are correct for serial number, baud rate, check mode, stop bit, etc.

2.) Short TX and RX See if spontaneous self-pickup is possible

3.) If it is connected to the computer through the Serial debugging tool/HyperTerminal debugging, please confirm whether the serial line can receive the normal, send data. Can be shortened to see if it can be spontaneous self-collection.


5. Hardware Solder WireHardware-soldered TX RX GND Three wires connect peripheral communication devices for communication debugging.
6. Serial Log printing method:1) After inserting the UART line, the computer will automatically install the corresponding driver, my computer-right-Device Manager-Port: usb-to-serial Comm Port (COM14), in this can query to the UART corresponding computer port number;2) Serial printing toolA. Computer-brought Super Terminal: How to use:Start Menu-All Programs-accessories-communication-HyperTerminal-fill in the name & port number, you can automatically generate the application popup interface, can be used to display the printed UART serial port information; B) "Serial tools": download online c) securecrt: download on the network, using the method: connet-> Right-->properties set properties: set Communication type to serial port:protocol:serial Setting the port configuration: Serial:Port:COM14
7.andori UART Log eng version is also unable to spit analysis the ENG version automatically turns off the UART Log after booting to launcher, which results in a consistent test result on the ENG version and the user version for almost a majority of the tests . There are two ways to temporarily open the UART log on the ENG version (after a reboot): Press any key on the keyboard in the HyperTerminal window to let the UART log continue to spit. This method requires the TX and Rx of the UART to be connected well. by modifying the way the proc parameter: adb shell echo 1 >/PROC/MTPRINTKThere is also a way to permanently open the UART Log on the ENG version (which continues to work after a reboot): by modifying the property's way: adb shell SetProp persist.uartconsole.enable 1 (via Getprop Persist.uartconsole.enable can query attribute values ) Reference:[UART log Stop output issue after faq11402]jb9/kk1 version boot animation [FAQ10087] Why does the UART log not vomit after entering the launcher interface?
8.andori UART Log User version How to open Reference: [FAQ02495] How to open the UART log under Android User version [FAQ03891] How to open the serial port (Uart) in the user version, grab the upper log, open the input console

MTK Android Driver:uart

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.