Date: Tue, 16 Oct 2007 21:34:20 +0800 From: "Xiaofan Chen" <xiaofanc@gmail.com> To: "Hans Petter Selasky" <hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: PICDEM FS USB Bootloader under FreeBSD Message-ID: <a276da400710160634g3d88b527j550c41223278c9e5@mail.gmail.com> In-Reply-To: <a276da400710130240h134ddd95p6c34539b2843d0ab@mail.gmail.com> References: <a276da400710120806k636347eew876ee0fb3fc17ab3@mail.gmail.com> <200710121919.36175.hselasky@c2i.net> <a276da400710130240h134ddd95p6c34539b2843d0ab@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/13/07, Xiaofan Chen <xiaofanc@gmail.com> wrote: > On 10/13/07, Hans Petter Selasky <hselasky@c2i.net> wrote: > > I think that the write STALLED. You can check this by turning on > > debugging on the OHCI controller by: > > > > systctl hw.usb.ohci.debug=15 > > > > Replace "ohci" by "ehci" or "uhci" if you are using such controllers. > > Strange today reading seems to work. I will check other functionality > later. This bootloader device uses bulk transfer. > So this is the last one I want to make to work under FreeBSD right now. Unfortunately verifying and writing are still not working. Reading is working. The bootloader firmware uses a cut-down version of the USB firmware framework. Maybe it is even buggier. ===[mcuee] ~/Desktop/build/fsusb/fsusb-0.1.11-2 # sudo ./fsusb newdemo.hex usb_set_debug: Setting debugging level to 255 (on) Locating USB Microchip(tm) PICDEM-FS USB(tm) (vendor 0x04d8/product 0x000b) usb_os_find_busses: Found /dev/usb0 usb_os_find_busses: Found /dev/usb1 usb_os_find_busses: Found /dev/usb2 usb_os_find_devices: Found /dev/ugen0 on /dev/usb1 usb_control_msg: 128 6 512 0 0xbfbfe988 8 1000 usb_control_msg: 128 6 512 0 0x804d0e0 32 1000 Found USB PICDEM-FS USB as device '/dev/ugen0' on USB bus /dev/usb1 Communication established. Onboard firmware version is 1.0 ^C CTRL-C since it hanges here. ===[mcuee] ~/Desktop # dmesg ... ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x0002 wValue=0x0301 wIndex=0x0001 ohci_device_done: xfer=0xc41a9a20, pipe=0xc3053100 length=10 error=0 ohci_device_done: xfer=0xc41a9a20, pipe=0xc3053100 length=10 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x000e wValue=0x0301 wIndex=0x0001 ohci_device_done: xfer=0xc41aa420, pipe=0xc3053100 length=22 error=0 ohci_device_done: xfer=0xc41aa420, pipe=0xc3053100 length=22 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x0002 wValue=0x0302 wIndex=0x0001 ohci_device_done: xfer=0xc41a9820, pipe=0xc3053100 length=10 error=0 ohci_device_done: xfer=0xc41a9820, pipe=0xc3053100 length=10 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x001c wValue=0x0302 wIndex=0x0001 ohci_device_done: xfer=0xc41a9c20, pipe=0xc3053100 length=36 error=0 ohci_device_done: xfer=0xc41a9c20, pipe=0xc3053100 length=36 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x0002 wValue=0x0301 wIndex=0x0001 ohci_device_done: xfer=0xc3cdaa20, pipe=0xc3054900 length=10 error=0 ohci_device_done: xfer=0xc3cdaa20, pipe=0xc3054900 length=10 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x000e wValue=0x0301 wIndex=0x0001 ohci_device_done: xfer=0xc41a9e20, pipe=0xc3054900 length=22 error=0 ohci_device_done: xfer=0xc41a9e20, pipe=0xc3054900 length=22 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x0002 wValue=0x0302 wIndex=0x0001 ohci_device_done: xfer=0xc41a9420, pipe=0xc3054900 length=10 error=0 ohci_device_done: xfer=0xc41a9420, pipe=0xc3054900 length=10 error=5 ohci_root_ctrl_task_td: type=0x80 request=0x06 wLen=0x001c wValue=0x0302 wIndex=0x0001 ohci_device_done: xfer=0xc41a9020, pipe=0xc3054900 length=36 error=0 ohci_device_done: xfer=0xc41a9020, pipe=0xc3054900 length=36 error=5 ohci_setup_standard_chain: addr=126 endpt=0 len=16 speed=2 ohci_setup_standard_chain: nexttog=1; data before transfer: TD(0xe6a8b080) at 0x3eb13080: -TOG0 delay=7 ec=0 cc=15 cbp=0x3eb13000 next=0x3eb13060 be=0x3eb13007 TD(0xe6a8b060) at 0x3eb13060: -R-IN-TOG1 delay=7 ec=0 cc=15 cbp=0x3eb13008 next=0x3eb13040 be=0x3eb1300f TD(0xe6a8b040) at 0x3eb13040: -OUT-TOG1 delay=1 ec=0 cc=15 cbp=0x00000000 next=0x00000000 be=0xffffffff _ohci_append_qh: 0xe6a8b0a0 to 0xc3007100 ohci_check_transfer: xfer=0xc3cd9c20 checking transfer ohci_non_isoc_done: xfer=0xc3cd9c20 pipe=0xc41a2900 transfer done TD(0xe6a8b080) at 0x3eb13080: -TOG1 delay=7 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x3eb13007 ohci_non_isoc_done: len=8 ohci_non_isoc_done: len=8 ohci_non_isoc_done: len=0 ohci_non_isoc_done: actlen=16 ohci_device_done: xfer=0xc3cd9c20, pipe=0xc41a2900 length=16 error=0 _ohci_remove_qh: 0xe6a8b0a0 from 0xe6a8b0a0 ohci_device_done: xfer=0xc3cd9c20, pipe=0xc41a2900 length=16 error=5 _ohci_remove_qh: 0xe6a8b0a0 from 0xc3007100 ohci_setup_standard_chain: addr=126 endpt=0 len=40 speed=2 ohci_setup_standard_chain: nexttog=1; data before transfer: TD(0xe6a8b0a0) at 0x3eb130a0: -TOG0 delay=7 ec=0 cc=15 cbp=0x3eb13000 next=0x3eb13080 be=0x3eb13007 TD(0xe6a8b080) at 0x3eb13080: -R-IN-TOG1 delay=7 ec=0 cc=15 cbp=0x3eb13008 next=0x3eb13060 be=0x3eb13027 TD(0xe6a8b060) at 0x3eb13060: -OUT-TOG1 delay=1 ec=0 cc=15 cbp=0x00000000 next=0x00000000 be=0xffffffff _ohci_append_qh: 0xe6a8b0c0 to 0xc3007100 ohci_check_transfer: xfer=0xc41a9220 checking transfer ohci_non_isoc_done: xfer=0xc41a9220 pipe=0xc41a2900 transfer done TD(0xe6a8b0a0) at 0x3eb130a0: -TOG1 delay=7 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x3eb13007 ohci_non_isoc_done: len=8 ohci_non_isoc_done: len=32 ohci_non_isoc_done: len=0 ohci_non_isoc_done: actlen=40 ohci_device_done: xfer=0xc41a9220, pipe=0xc41a2900 length=40 error=0 _ohci_remove_qh: 0xe6a8b0c0 from 0xe6a8b0c0 ohci_device_done: xfer=0xc41a9220, pipe=0xc41a2900 length=40 error=5 _ohci_remove_qh: 0xe6a8b0c0 from 0xc3007100 ohci_setup_standard_chain: addr=126 endpt=0 len=8 speed=2 ohci_setup_standard_chain: nexttog=1; data before transfer: TD(0xe6a9b520) at 0x3e816520: -TOG0 delay=7 ec=0 cc=15 cbp=0x3e8164b0 next=0x3e816500 be=0x3e8164b7 TD(0xe6a9b500) at 0x3e816500: -IN-TOG1 delay=1 ec=0 cc=15 cbp=0x00000000 next=0x00000000 be=0xffffffff _ohci_append_qh: 0xe6a9b540 to 0xc3007100 ohci_check_transfer: xfer=0xc42020e8 checking transfer ohci_non_isoc_done: xfer=0xc42020e8 pipe=0xc41a2900 transfer done TD(0xe6a9b520) at 0x3e816520: -TOG1 delay=7 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x3e8164b7 ohci_non_isoc_done: len=8 ohci_non_isoc_done: len=0 ohci_non_isoc_done: actlen=8 ohci_device_done: xfer=0xc42020e8, pipe=0xc41a2900 length=8 error=21 _ohci_remove_qh: 0xe6a9b540 from 0xe6a9b540 ohci_device_bulk_start: xfer=0xc41f2020 len=5 ohci_setup_standard_chain: addr=126 endpt=1 len=5 speed=2 ohci_setup_standard_chain: nexttog=0; data before transfer: TD(0xe6a9b460) at 0x3e816460: -OUT-TOG0 delay=1 ec=0 cc=15 cbp=0x3eb13000 next=0x00000000 be=0x3eb13004 _ohci_append_qh: 0xe6a9b480 to 0xc3007130 ohci_check_transfer: xfer=0xc41f2020 checking transfer ohci_non_isoc_done: xfer=0xc41f2020 pipe=0xc41a2914 transfer done TD(0xe6a9b460) at 0x3e816460: -OUT-TOG1 delay=1 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x3eb13004 ohci_non_isoc_done: len=5 ohci_non_isoc_done: actlen=5 ohci_device_done: xfer=0xc41f2020, pipe=0xc41a2914 length=5 error=0 _ohci_remove_qh: 0xe6a9b480 from 0xe6a9b480 ohci_setup_standard_chain: addr=126 endpt=0 len=8 speed=2 ohci_setup_standard_chain: nexttog=1; data before transfer: TD(0xe6aac520) at 0x3e7fb520: -TOG0 delay=7 ec=0 cc=15 cbp=0x3e7fb4b0 next=0x3e7fb500 be=0x3e7fb4b7 TD(0xe6aac500) at 0x3e7fb500: -IN-TOG1 delay=1 ec=0 cc=15 cbp=0x00000000 next=0x00000000 be=0xffffffff _ohci_append_qh: 0xe6aac540 to 0xc3007100 ohci_check_transfer: xfer=0xc42130e8 checking transfer ohci_non_isoc_done: xfer=0xc42130e8 pipe=0xc41a2900 transfer done TD(0xe6aac520) at 0x3e7fb520: -TOG1 delay=7 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x3e7fb4b7 ohci_non_isoc_done: len=8 ohci_non_isoc_done: len=0 ohci_non_isoc_done: actlen=8 ohci_device_done: xfer=0xc42130e8, pipe=0xc41a2900 length=8 error=21 _ohci_remove_qh: 0xe6aac540 from 0xe6aac540 ohci_device_bulk_start: xfer=0xc4203020 len=4 ohci_setup_standard_chain: addr=126 endpt=1 len=4 speed=2 ohci_setup_standard_chain: nexttog=0; data before transfer: TD(0xe6aac460) at 0x3e7fb460: -R-IN-TOG0 delay=1 ec=0 cc=15 cbp=0x3e815000 next=0x00000000 be=0x3e815003 _ohci_append_qh: 0xe6aac480 to 0xc3007130 ohci_check_transfer: xfer=0xc4203020 checking transfer ohci_non_isoc_done: xfer=0xc4203020 pipe=0xc41a2928 transfer done TD(0xe6aac460) at 0x3e7fb460: -R-IN-TOG1 delay=1 ec=0 cc=0 cbp=0x00000000 next=0x00000000 be=0x3e815003 ohci_non_isoc_done: len=4 ohci_non_isoc_done: actlen=4 ohci_device_done: xfer=0xc4203020, pipe=0xc41a2928 length=4 error=0 _ohci_remove_qh: 0xe6aac480 from 0xe6aac480 ohci_device_done: xfer=0xc4203020, pipe=0xc41a2928 length=4 error=5 _ohci_remove_qh: 0xe6aac480 from 0xc3007130 ohci_device_done: xfer=0xc42130e8, pipe=0xc41a2900 length=8 error=5 _ohci_remove_qh: 0xe6aac540 from 0xc3007100 ohci_device_done: xfer=0xc41f2020, pipe=0xc41a2914 length=5 error=5 _ohci_remove_qh: 0xe6a9b480 from 0xc3007130 ohci_device_done: xfer=0xc42020e8, pipe=0xc41a2900 length=8 error=5 _ohci_remove_qh: 0xe6a9b540 from 0xc3007100 Any suggestions to fix the problem will be greatly appreciated. Regards, Xiaofan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a276da400710160634g3d88b527j550c41223278c9e5>