UART

From MILEDROPEDIA
Jump to: navigation, search

Description

You can use for debugging purposes early output from UART3 - over the micro-usb port and usb-serial adaptor. The signal is compatible with serial uart devices that work with 3,3V TTL levels (signal levels from the phone are about 2.8V so you have to check specifications of the chosen adaptor to find out if it would work). If you obtain some usb to serial device it is useful to have the usb +5V wired to power the handset while using serial.

Here an good example how-to connect this solution: UART over USB.png

Best solutions now - use adaptors based on FTDI* chips, CP* chips or MAX232 chip.

Also you can use cheap USB<->TTL cable from FTDI with simple adapter. Details: UsbSerialCable.

example for CP2103

see this page http://www.spikenzielabs.com/SpikenzieLabs/USB_to_Serial.html

Here example for FT2232:

http://flashrom.org/FT2232SPI_Programmer

Possible devices

http://apple.clickandbuild.com/cnb/shop/ftdichip?productID=22&op=catalogue-product_info-null&prodCategoryID=24

http://www.sparkfun.com/commerce/product_info.php?products_id=8772

http://www.sparkfun.com/commerce/product_info.php?products_id=718

http://www.sparkfun.com/commerce/product_info.php?products_id=198

http://www.sparkfun.com/commerce/product_info.php?products_id=199

Software

Windows:

realterm http://realterm.sourceforge.net/

Linux:

minicom http://alioth.debian.org/projects/minicom/


Useful info

Serial Programming Guide (ENG) http://www.easysw.com/~mike/serial/serial.html

Serial Programming Guide (RUS) http://www.opennet.ru/docs/RUS/serial_guide/serial_guide-prog.html.gz

Linux Serial Console HOWTO http://www.vanemery.com/Linux/Serial/serial-console.html


Debugging mbm with UART and 2ndboot

Debug info from mbm started with 2ndboot with enabled emu_uart_debug feature:

*************
CPCAP_init( )
*************
ULPI Read link is dead
ULPI is dead
VBUS not present, try to recover
OMAP 480021a4 = 00000000

MBM - BOOT_TRUE:35  BOOT_FALSE:88
MBM - NAND Init - stay_in_bootloader: 35
ML/pBRDL SV check passed.
MBM SV check passed.
MBM - sp_SV_Efuse - stay_in_bootloader: 88

status & type 000000F0 00000002

MBM - CSPI Init - stay_in_bootloader: 88
MBM - HAPI_BL_handle_powercut - stay_in_bootloader: 88
REG MEMA reg[266] = 212
REG MEMA reg[266] = 212
REG MEMA reg[266] = 212
REG MEMA reg[266] = 212
MISC command: 0 0 0 0 0 0 0 0 0 0 0 0 0 0
boot_mode (1 for recovery): 0
REG MEMA reg[266] = 212
REG MEMA reg[266] = 212
REG MEMA reg[266] = 212
REG MEMA reg[266] = 202
REG MEMA reg[266] = 200
REG MEMA reg[266] = 200
REG MEMA reg[266] = 200
PRM_RSTST_GR 0x00000000
REG[2] = 8080
Powerup reason 0x20000
Backlight status 00000000
Backlight turned on
fl_bl_load_linux_object: cg 42
In function fromfile 70373135
after function fromfile 70373138
fl_bl_load_linux_object: cg 61
fl_bl_load_linux_object: cg 35
out of IFS
load/valiate 0x5043 LBL passed
CG[0] name: mbmloader: cg_num 63 , ignored
CG[1] name: mbm: cg_num 30 , ignored
CG[2] name: mbmbackup: cg_num 55 , ignored
CG[3] name: bploader: cg_num 56 , ignored
CG[4] name: cdt.bin: cg_num 31 , ignored
CG[5] name: pds: cg_num 38 , ignored
CG[6] name: lbl: cg_num 34 , ignored
CG[7] name: lbl_backup: cg_num 57 , ignored
CG[8] name: cid: cg_num 43 , ignored
CG[9] name: sp: cg_num 41 , ignored
CG[10] name: devtree: cg_num 61 MOT_AP: validating status:0xf0 (passed=0xf0)
CG[11] name: logo.bin: cg_num 42 , ignored
CG[12] name: misc: cg_num 44 , ignored
CG[13] name: boot: cg_num 35 MOT_AP: validating status:0xf0 (passed=0xf0)
CG[14] name: bpsw: cg_num 45 , ignored
CG[15] name: recovery: cg_num 47 , ignored
CG[16] name: cdrom: cg_num 33 type:OTV validating status:0xf0 (passed=0xf0)
CG[17] name: system: cg_num 39 type:OTV validating status:0xf0 (passed=0xf0)
CG[18] name: cache: cg_num 40 , ignored
CG[19] name: userdata: cg_num 37 , ignored
CG[20] name: cust: cg_num 36 type:OTV validating status:0xf0 (passed=0xf0)
CG[21] name: kpanic: cg_num 53 , ignored
CG[22] name: rsv: cg_num 54 , ignored
BOOTUP TIME details:
ram disk start addr: 0x8135F000
ram disk load addr: 0x8F211000
ram disk size: 0x35BF9
kernel start addr: 0x81100800
kernel size: 0x25E1E8
image load and validation passed
BOOTUP TIME details:
ram disk start addr: 0x8F211000
ram disk size: 0x35BF9
kernel start addr: 0x81100800
kernel size: 0x25E1E8
MBM - fl_bl_prep_jump_to_phone_code: 88
MBM - stay_in_bootloader: 88
MBM - trying bp_usb_boot ()