JTAG Serial Cable run 1 for Milkymist One
|Item||Description||Planned Start date||Status|
|KiCad design file,||Notice: Any derivative work from here, you should completely read all test results and take works yourself. If you found error, please let us know about them. This Run1 PCB errata you must read Bugs, Steps of Rework and Improvements||Done|
|KiCad to BOM||KiCad generates lst file||Done|
|KiCad to Digi-Key/Mouser/Sharism||boom generates shopping list / Order status||All parts get ordered.||Done|
|KiCad to gerber/drill file||The process of settings on KiCad Gerber and Drill Files||Done|
|Determine PCB panelized||http://en.qi-hardware.com/wiki/File:M1_jtag_panel_run1_illustration_revised.pdf, source.||Done|
|Single gerber-Out to PCB maker||check list, pcb maker sent a panel gerber file back||Done|
|KiCad to AI file||How to generate KiCad Automatic Insertion File? coordinate files（front /back ) of parts.||Done|
|PCB Back Check||Confirm PCB quality, panel top, panel bottom||Done|
|Engineering files to SMT manufacturer||BoM/AI/panel gerber/placement top/placement bottom/parts polarity top/released parts' qty information/page 58 of Soldering reflow profile in FT2232HQ-REEL||This date prior to SMT date||Done|
|Some photos SMT/Through hole process||PCBA is estimated arrival on January 3th, 2011||Within end week of 2010||Done|
|Tests & Results||Done|
 Some photos
The P2 2x7pins JTAG header being placed manually. Notice that the package status of P2 incoming I chose is tubes. So there's no way to be picked/placed by auto machine. This is the case that was not an good design for manufacturing. It must be improved later on design beginnings and layout changes like choosing the part with locator posts if having further runs later.
The operator did the place work followed my instruction to her. This was escaped the foreword seriously if I didn't provide them an clear instruction on placing RIGHT at CENTER of pad of P2 footprint EXACTLY. I can imagine it should have made completed wrong and nonbalanced placement if I have not reminded.
Firstly we planed to mount back side of panel then front side. The serial female header 1x 4 pins of P1 was missing due to different process. We only planed to produce 100 pcs, so this P1 part will be manually soldered later. Notice that an optical Fiducial Mark placed above 'C35' Silkscreen this time is totally non-function since I leaved a width of 5mm only for V-Cut side board. But their smt machine FUJI XP-243EUNIQ48002c4267b242ef-nowiki-00000002-QINU1UNIQ48002c4267b242ef-nowiki-00000003-QINU's conveyor blocked 3mm which covered this mark, so smt machine can not do an calibration of setting origin point. This happens since we changed smt vendor and got not enough info from different machine. This will always be paid more attentions on this. But we were lucky because we had have P1 though holes. So use P1's holes to be as the origin of the coordinates. So either placing the design/placement within 'single' gerber or shifting the mark a bit.
 Tests and Results
- Step1: Make sure the pod connected on a stable +5V supplied by mini-USB cable and its current is good without huge consumptions. See Fig. 3. Finally got one board with D2 failure.
- Step2: Update Milymist One JTAG/Serial pod firmware
Follow instructions of Update JTAG firmware on Windows, use FTDI_Prog tool to update following data:
Vendor ID : 20B7 Product ID : 0713 Manufacturer : Qi Hardware Product Description : Milkymist One JTAG/Serial Port A Hardware : 245 FIFO Port B Hardware : RS232 UART
You can also do checks that by running on command line once you've plugged:
adam@adam-laptop:/$ sudo lsusb -d 20b7:0713 -v Bus 002 Device 031: ID 20b7:0713 Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x20b7 idProduct 0x0713 bcdDevice 7.00 iManufacturer 1 Qi Hardware iProduct 2 Milkymist One JTAG/Serial iSerial 3 FTU1MZXA bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 55 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 90mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 2 Milkymist One JTAG/Serial Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 2 Milkymist One JTAG/Serial Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0000 (Bus Powered)
The result of Step 2, got one board can not be detected in FTDI_Prog. See pictures below:
- Step3: Test on Milkymist One board
1, Make sure Milkymist One board power is off.
2, Plug JTAG/Serial pod into Milkymist One board.
3, Plug USB mini-B cable into pod's usb connector.
4, Open a terminal session, type dmesg. There must be one high speed USB device shown below:
[ 9366.357089] usb 2-3: new high speed USB device using ehci_hcd and address 6 [ 9366.493871] usb 2-3: configuration #1 chosen from 1 choice [ 9366.496693] usb 2-3: Ignoring serial port reserved for JTAG [ 9366.499438] ftdi_sio 2-3:1.1: FTDI USB Serial Device converter detected [ 9366.499500] usb 2-3: Detected FT2232H [ 9366.499506] usb 2-3: Number of endpoints 2 [ 9366.499512] usb 2-3: Endpoint 1 MaxPacketSize 512 [ 9366.499518] usb 2-3: Endpoint 2 MaxPacketSize 512 [ 9366.499524] usb 2-3: Setting MaxPacketSize 512 [ 9366.499842] usb 2-3: FTDI USB Serial Device converter now attached to ttyUSB0
5, Turn power on the Milkymist One board.
6, Git clone UrJTAG tool, then type jtag. Under this tool, type cable milkymist and detect commands to read Spartan-6 FPGA id back as below. Then this means the connection of JTAG between Milkymist One board and JTAG/Serial pod is well-connected and passed.
root@adam-laptop:/home/adam# jtag UrJTAG 0.10 # Copyright (C) 2002, 2003 ETC s.r.o. Copyright (C) 2007, 2008, 2009 Kolja Waschk and the respective authors UrJTAG is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. There is absolutely no warranty for UrJTAG. jtag.c:518 main() Warning: UrJTAG may damage your hardware! Type "quit" to exit, "help" for help. jtag> cable milkymist Connected to libftdi driver. jtag> detect IR length: 6 Chain length: 1 Device Id: 00100100000000001000000010010011 (0x24008093) Manufacturer: Xilinx (0x093) Part(0): xc6slx45 (0x4008) Stepping: 2 Filename: /usr/local/share/urjtag/xilinx/xc6slx45/xc6slx45 jtag> quit
7, Use automated test program binary file boot.bin and open another new session of terminal, type following command to wait:
adam@adam-laptop:~/m1_adam/rc2_test$ flterm --port /dev/ttyUSB0 --kernel boot.bin [FLTERM] Starting...
8, Press SW2 on Milkymist One board, you should see some log messages came from Milkymist One board in automated test program session as below. This means the way RX function from Milkymist One to pod is good and passed. Meanwhile the D3 and D4 LEDs on pods must be flash. Immediately go into automated test program session and press 'Escape' key, if you see boot status stop and BIOS> show up. Means the way TX function from pod to Milkymist One board is also work well and passed. Of course you can still type 'serialboot' enter automated test program.
libHPDMC SDRAM initialization runtime (c) Copyright 2010 Sebastien Bourdeauducq, released under GNU LGPL version 3. Version 1.0RC1 Initialization sequence completed. Autocalibration OK, testing memory... All SDRAM initialization completed, boot continuing. VGA: framebuffers at 0x441a33e0 0x443233e0 0x444a33e0 VGA: DDC I2C bus initialized VGA: mode set to 640x480 MILKYMIST(tm) v1.0RC1 BIOS http://www.milkymist.org (c) Copyright 2007, 2008, 2009, 2010 Sebastien Bourdeauducq This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License. I: BIOS CRC passed (7f7b4c54) BRD: SoC 1.0RC1 on Milkymist One (PCB revision 1) BRD: Mem. card : Yes BRD: AC'97 : Yes BRD: PFPU : Yes BRD: TMU : Yes BRD: Ethernet : Yes BRD: FML meter : Yes BRD: Video in : Yes BRD: MIDI : Yes BRD: DMX : Yes BRD: IR : Yes BRD: USB : Yes BRD: Memtester : No TMU: texture mapping unit initialized USB: loading Navre firmware USB: starting host controller USB: HC: softusb-input v1.0RC1 UKB: USB keyboard connected to console I: Displaying splash screen...USB: HC: Low speed device on port A OK I: MAC address: 10:e2:d5:00:00:24 I: Press Q or ESC to abort boot I: Aborted boot on user request BIOS> USB: HC: VID: 046D, PID: C062 USB: HC: Found mouse serialboot
9, Turn power off on Milkymist One board and plug out USB mini-B cable.
10, Marking a p character on J1 of pod to stand for passed pod.
After Step3 test, there's one pod got jtag mis-function.
Notice: My linux laptop didn't tell if pod is inserted, so entered two commands at my site. Then type 'dmesg', should show USB device messages shown as Step 3's item 4. See how community helped me this, see Qi Hardware IRC log and Milkymist IRC log.
root@adam-laptop:/home/adam# rmmod ftdi_sio root@adam-laptop:/home/adam# modprobe ftdi_sio vendor=0x20b7 product=0x0713 root@adam-laptop:/home/adam# dmesg
Meanwhile recorded my environment here:
root@adam-laptop:/home/adam# uname -a Linux adam-laptop 2.6.32-27-generic #49-Ubuntu SMP Wed Dec 1 23:52:12 UTC 2010 i686 GNU/Linux
 Bugs, Steps of Rework and Improvements
1-1, An example of detecting a new full speed USB device not high speed.
[ 9097.820073] usb 5-1: new full speed USB device using uhci_hcd and address 2 [ 9097.963104] usb 5-1: not running at top speed; connect to a high speed hub [ 9097.994227] usb 5-1: configuration #1 chosen from 1 choice [ 9098.002301] usb 5-1: Ignoring serial port reserved for JTAG [ 9098.006252] ftdi_sio 5-1:1.1: FTDI USB Serial Device converter detected [ 9098.006315] usb 5-1: Detected FT2232H [ 9098.006321] usb 5-1: Number of endpoints 2 [ 9098.006327] usb 5-1: Endpoint 1 MaxPacketSize 64 [ 9098.006333] usb 5-1: Endpoint 2 MaxPacketSize 64 [ 9098.006338] usb 5-1: Setting MaxPacketSize 64 [ 9098.007555] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB0
1-2, An example of detecting normally a new high speed USB device.
[ 9152.329069] usb 2-1: new high speed USB device using ehci_hcd and address 6 [ 9152.465653] usb 2-1: configuration #1 chosen from 1 choice [ 9152.468353] usb 2-1: Ignoring serial port reserved for JTAG [ 9152.472379] ftdi_sio 2-1:1.1: FTDI USB Serial Device converter detected [ 9152.472417] usb 2-1: Detected FT2232H [ 9152.472419] usb 2-1: Number of endpoints 2 [ 9152.472422] usb 2-1: Endpoint 1 MaxPacketSize 512 [ 9152.472425] usb 2-1: Endpoint 2 MaxPacketSize 512 [ 9152.472427] usb 2-1: Setting MaxPacketSize 512 [ 9152.473533] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
1-3, Root Cause
Yanjun Luo found this bug: The ground pads of C3, R14, C27 and C28, which their grounds are all connected together to a locally same net and which doesn't connect globally to system ground. So that functionalities of these four parts become invalid:
a) C3, which is for the 12MHz Xtal purpose(Oscillator output), although I have never met any one time fail on 12MHz pulse during 97pcs tests. It'll still have a potential failure that will be happened on end user one day. b) R14, for FDTI chip current reference. c) C27, C28; for USB VPHY power supply noise reduction.
This bug happened was the serious mistake took: Before I made pcb, I only checked gerber routes, verified parts, footprints and didn't discover this 'unconnected pads' on ground. After performed 'design rules check' in KiCad PCBnew, it had been indeed already existed there:
** Drc report for /home/adam/m1/jtag-serial/usb_jtag.brd ** ** Created on 2011-02-12 10:53:00 ** ** Found 0 DRC errors ** ** Found 2 unconnected pads ** ErrType(2): Unconnected pads @ (108.311 mm,110.820 mm): Pad "1" (Back) of P2 @ (108.049 mm,109.860 mm): Pad "2" (Front) of R14 ErrType(2): Unconnected pads @ (110.711 mm,109.901 mm): Pad "2" (Front) of C3 @ (108.049 mm,109.860 mm): Pad "2" (Front) of R14 ** End of Report **
1-4, Fixed patch contributed by Yanjun Luo here.
1-5, Preventive action
a), Contributor who commits the *.brd file, must perform 'DRC' and confirm design before commitment.
b), Before making pcb, must confirm latest design without DRC error from git server. Compare gerber files with brd design file as possible.
1-6, Rework: Steps of rework to fix high speed bug
A quick way of rework about engineering change is to wire a connection from connect C27's pin 2 ground pad to the nearest copper of system ground. See steps as below.
2, Determine and find suitable height of J5 header on Milkymist One board.
Not GOOD and un-horizontal: Fig. 13, U1 CAT93C46 on pod which collides with outlet of J6 on M1.
3, SMT/Through holes process: feedbacks to smt vendor about above three failures.
 Available Stocks
52 / 100 pcs
 Next Schedule
- Milkymist JTAG-serial daughterboard
- Files to parts / pcb / smt manufacturer
- ↑ FUJI XP-243E
- ↑ ABM-8303D 30V 3A
- ↑ Update JTAG firmware on_Windows
- ↑ http://urjtag.git.sourceforge.net/git/gitweb.cgi?p=urjtag/urjtag;a=summary
- ↑ Milkymist One test tool
- ↑ http://en.qi-hardware.com/irclogs/qi-hardware_2011-01-03.log.html
- ↑ Kernel doesn't tell USB device of Milkymist One JTAG/Serial pod
- ↑ High Speed Basics
- ↑ Email about Root Cause on devel-milkymist.org