the debug board provide:
- serial port (via USB)
- JTAG (via USB)
- write to NOR
Is Debug Board flashed correctly?
Connect the USB uplink port to PC,
root@test-laptop:~# lsusb -d 1457:5118;lsusb -d 0403:6010;
Bus 003 Device 007: ID 1457:5118
root@test-laptop:~#
USB ID 1457:5118 ==> everything is correct.
USB ID 0403:6010 ==> the board needs to be reflashed, check here
Install driver
No /dev/ttyUSBx will show up if debug board connected to PC without driver installed.
on Ubuntu 8.04
- Install libftdi >=0.8
apt-get install libftdi0
(which install 0.10-2) - rmmod ftdi_sio ;modprobe ftdi_sio vendor=0x1457 product=0x5118;
add the following line to /etc/modprobe.d/options (wiki says modules.conf)options ftdi_sio vendor=0x1457 product=0x5118
- Download http://people.openmoko.org/laforge/misc/debug_board_v2/udev_rules/099_neo1973_debugboard.rules to /etc/udev/rules.d, and make the following changes:
# udev rules file for Neo1973 Debug Board v2
Uncomment the debug rule to see whether it is working or not.
#
ACTION!="add", GOTO="neo1973_dbg_rules_end"
#SUBSYSTEM!="usb_device", GOTO="neo1973_dbg_rules_end"
SUBSYSTEM!="usb", GOTO="neo1973_dbg_rules_end"
SYSFS{idVendor}=="1457", SYSFS{idProduct}=="5118", MODE="664", GROUP="users"
#For debugging
#use tail -n 50 /var/log/messages to see if this script is ran
#SYSFS{idVendor}=="1457", SYSFS{idProduct}=="5118", RUN+="/usr/bin/logger ==="
LABEL="neo1973_dbg_rules_end" - Install OpenOCD for JTAG debugging, or use the terminal emualtor (minicom, cu, zc, ...) for the console message dumping
serial => /dev/ttyUSB1, 115200
(I didn't use openocd, so that's all I have done.....)
The recommended connection sequence is:
- Unplug both USB cables
- Remove the Neo1973 battery
- Connect the FPC between the Neo1973 and the debug board
- Replace the Neo1973 battery
- Plug the Neo1973 USB cable into your PC
- If the Neo1973 does not turn on automatically at this point, hold the power button for 5 seconds
- Plug the debug-board USB cable into your PC
一看debug板子上有留JTAG和UART的socket就衝動的以為PC是用這兩個跟FR相聯接,差點把缺的socket焊上去了,還一邊找 socket一邊念,怎麼這樣搞,連socket也不附......跟Andrew研究過更發現:怎麼連RS-232 tranceiver也沒有!! 這...真的是太超過了...!#@$^%@#$!#@$
冷靜一點以後,想想,這麼複雜的東西應該不會連wiki也不寫吧,差點要 mail去問了說,卻總是覺得怪怪的。再三研究過電路圖後才發現,從FR來的JTAG, J1,和FT2232D Channel A, UART, J10, FT2232D的Channel B是連在一起的!!
原來那兩個JTAG與UART的位置是留給其他 非Freerunner/GTA01 device 讓它們也可以透過這個debug board跟PC做連接;換句話說,就是這塊Debug board就是提供JTAG, serial to USB的功能,這兩個port是連接其他device,而不是連接到PC用的。第1張圖也說明的很清楚了,"Non-Neo1973"...
所以在PC上沒有其他device佔用ttyUSB的情況下,JTAG在PC就變成/dev/ttyUSB0,UART變成/dev/ttyUSB0,當然不需要Tranceiver囉
軟性印刷電路版(FPC:Flexible Printed Circuit)
sometimes called flex cable or flexible cable
SMT connector (Andy Green是這麼說的)
After plugging both USB of FR and Debug board to PC, the PC dmesg reports:
[22932.304312] usb 5-2: new full speed USB device using uhci_hcd and address 18However, only /dev/ttyACM0 is available, no /dev/ttyUSB0 and /dev/ttyUSB1
[22932.487138] usb 5-2: configuration #1 chosen from 2 choices
[22932.497342] /build/buildd/linux-2.6.24/drivers/usb/class/cdc-acm.c: This device cannot do calls on its own. It is no modem.
[22932.497373] cdc_acm 5-2:1.0: ttyACM0: USB ACM device
[22935.663858] usb 5-1: new full speed USB device using uhci_hcd and address 19
[22935.816913] usb 5-1: configuration #1 chosen from 1 choice
[22935.818759] hub 5-1:1.0: USB hub found
[22935.820674] hub 5-1:1.0: 4 ports detected
[22936.137318] usb 5-1.1: new full speed USB device using uhci_hcd and address 20
[22936.297399] usb 5-1.1: configuration #1 chosen from 1 choice
minicom, /dev/ttyUSB1, 115200, 8N1, no flow control
It shows nothing, but when I input characters, it show:
�[ `��!����'�!���������������������������������At last, I reconnect the flex cable, and found that I could insert the cable deeper to the SMT connector on the phone. and all fix!!!! refer
http://wiki.openmoko.org/wiki/Category:Debug_Board
http://wiki.openmoko.org/wiki/Debug_Board_v2
http://wiki.openmoko.org/wiki/Debug_Board_v2#Hardware_connection
http://wiki.openmoko.org/wiki/Debug_Board_v3
http://wiki.openmoko.org/wiki/Connecting_GTA01Bv2_with_Debug_Board
http://wiki.openmoko.org/wiki/Connecting_Neo_1973_with_Debug_Board_v2
http://wiki.openmoko.org/wiki/Disassembling_Neo1973
http://wiki.openmoko.org/wiki/Neo_FreeRunner_GTA02_Hardware#Debug_Board
http://people.openmoko.org/laforge/doc/hardware/neo1973_debug_board/neo1973_debugboard_v2_schematics.pdf
http://www.ftdichip.com/Documents/DataSheets/DS_FT2232D.pdf
http://www.datasheetcatalog.org/datasheet/sipex/SP213EHEA.pdf
http://www.maxim-ic.com.cn/pdfserv/en/ds/MAX3222-MAX3241.pdf
沒有留言:
張貼留言