Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 2008 10:56:02 +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:  <a276da400804241956r3a7759bp298c76ccdaf8eb76@mail.gmail.com>
In-Reply-To: <a276da400710160634g3d88b527j550c41223278c9e5@mail.gmail.com>
References:  <a276da400710120806k636347eew876ee0fb3fc17ab3@mail.gmail.com> <200710121919.36175.hselasky@c2i.net> <a276da400710130240h134ddd95p6c34539b2843d0ab@mail.gmail.com> <a276da400710160634g3d88b527j550c41223278c9e5@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 16, 2007 at 9:34 PM, Xiaofan Chen <xiaofanc@gmail.com> wrote:
> 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.
>

This does not work either with 7.0-Release and the HPS USB stack.
I will update to the latest SVN version of the HPS stack and see if the
situation will improve. The bootlaoder does work under Linux (as well as
Windows) fine with libusb (libusb-win32).

[mcuee@freebsd7 ~/Desktop/build/fsusb/fsusb-0.1.11-2]$ sudo ./fsusb
--verify demo.hex
Locating USB Microchip(tm) PICDEM-FS USB(tm) (vendor 0x04d8/product 0x000b)
Found USB PICDEM-FS USB as device '/dev/ugen1' on USB bus /dev/usb1
Communication established.  Onboard firmware version is 1.0
^C

[mcuee@freebsd7 ~/Desktop/build/fsusb/fsusb-0.1.11-2]$ dmesg
...
ohci_setup_standard_chain: addr=2 endpt=0 sumlen=16 speed=2
ohci_setup_standard_chain: nexttog=1; data before transfer:
TD(0xc40fab00) at 0x0173db00: -TOG0 delay=7 ec=0 cc=15
cbp=0x014fd120 next=0x0173d200 be=0x014fd127
TD(0xc40fa200) at 0x0173d200: -R-IN-TOG1 delay=7 ec=0 cc=15
cbp=0x014fd128 next=0x0173d280 be=0x014fd12f
TD(0xc40fa280) at 0x0173d280: -OUT-TOG1 delay=1 ec=0 cc=15
cbp=0x00000000 next=0x00000000 be=0xffffffff
_ohci_append_qh: 0xc40fab80 to 0xc4057580
ohci_check_transfer: xfer=0xc40bc050 checking transfer
ohci_non_isoc_done: xfer=0xc40bc050 pipe=0xc40bc9b0 transfer done
TD(0xc40fab00) at 0x0173db00: -TOG1 delay=7 ec=0 cc=0
cbp=0x00000000 next=0x00000000 be=0x014fd127
ohci_device_done: xfer=0xc40bc050, pipe=0xc40bc9b0, error=0
_ohci_remove_qh: 0xc40fab80 from 0xc40fab80
ohci_setup_standard_chain: addr=2 endpt=0 sumlen=49 speed=2
ohci_setup_standard_chain: nexttog=1; data before transfer:
TD(0xc40fa700) at 0x0173d700: -TOG0 delay=7 ec=0 cc=15
cbp=0x014fd120 next=0x0173d680 be=0x014fd127
TD(0xc40fa680) at 0x0173d680: -R-IN-TOG1 delay=7 ec=0 cc=15
cbp=0x014fd128 next=0x0173d600 be=0x014fd150
TD(0xc40fa600) at 0x0173d600: -OUT-TOG1 delay=1 ec=0 cc=15
cbp=0x00000000 next=0x00000000 be=0xffffffff
_ohci_append_qh: 0xc40fa780 to 0xc4057580
ohci_check_transfer: xfer=0xc40bc050 checking transfer
ohci_non_isoc_done: xfer=0xc40bc050 pipe=0xc40bc9b0 transfer done
TD(0xc40fa700) at 0x0173d700: -TOG1 delay=7 ec=0 cc=0
cbp=0x00000000 next=0x00000000 be=0x014fd127
ohci_device_done: xfer=0xc40bc050, pipe=0xc40bc9b0, error=0
_ohci_remove_qh: 0xc40fa780 from 0xc40fa780
ohci_setup_standard_chain: addr=2 endpt=0 sumlen=16 speed=2
ohci_setup_standard_chain: nexttog=1; data before transfer:
TD(0xc40fab00) at 0x0173db00: -TOG0 delay=7 ec=0 cc=15
cbp=0x014fd120 next=0x0173d200 be=0x014fd127
TD(0xc40fa200) at 0x0173d200: -R-IN-TOG1 delay=7 ec=0 cc=15
cbp=0x014fd128 next=0x0173d280 be=0x014fd12f
TD(0xc40fa280) at 0x0173d280: -OUT-TOG1 delay=1 ec=0 cc=15
cbp=0x00000000 next=0x00000000 be=0xffffffff
_ohci_append_qh: 0xc40fab80 to 0xc4057580
ohci_check_transfer: xfer=0xc40bc050 checking transfer
ohci_non_isoc_done: xfer=0xc40bc050 pipe=0xc40bc9b0 transfer done
TD(0xc40fab00) at 0x0173db00: -TOG1 delay=7 ec=0 cc=0
cbp=0x00000000 next=0x00000000 be=0x014fd127
ohci_device_done: xfer=0xc40bc050, pipe=0xc40bc9b0, error=0
_ohci_remove_qh: 0xc40fab80 from 0xc40fab80
ohci_setup_standard_chain: addr=2 endpt=0 sumlen=40 speed=2
ohci_setup_standard_chain: nexttog=1; data before transfer:
TD(0xc40fa700) at 0x0173d700: -TOG0 delay=7 ec=0 cc=15
cbp=0x014fd120 next=0x0173d680 be=0x014fd127
TD(0xc40fa680) at 0x0173d680: -R-IN-TOG1 delay=7 ec=0 cc=15
cbp=0x014fd128 next=0x0173d600 be=0x014fd147
TD(0xc40fa600) at 0x0173d600: -OUT-TOG1 delay=1 ec=0 cc=15
cbp=0x00000000 next=0x00000000 be=0xffffffff
_ohci_append_qh: 0xc40fa780 to 0xc4057580
ohci_check_transfer: xfer=0xc40bc050 checking transfer
ohci_non_isoc_done: xfer=0xc40bc050 pipe=0xc40bc9b0 transfer done
TD(0xc40fa700) at 0x0173d700: -TOG1 delay=7 ec=0 cc=0
cbp=0x00000000 next=0x00000000 be=0x014fd127
ohci_device_done: xfer=0xc40bc050, pipe=0xc40bc9b0, error=0
_ohci_remove_qh: 0xc40fa780 from 0xc40fa780
ohci_setup_standard_chain: addr=2 endpt=0 sumlen=16 speed=2
ohci_setup_standard_chain: nexttog=1; data before transfer:
TD(0xc4daec00) at 0x098cac00: -TOG0 delay=7 ec=0 cc=15
cbp=0x06d0c120 next=0x098cab80 be=0x06d0c127
TD(0xc4daeb80) at 0x098cab80: -R-IN-TOG1 delay=7 ec=0 cc=15
cbp=0x06d0c128 next=0x098cab00 be=0x06d0c12f
TD(0xc4daeb00) at 0x098cab00: -OUT-TOG1 delay=1 ec=0 cc=15
cbp=0x00000000 next=0x00000000 be=0xffffffff
_ohci_append_qh: 0xc5d73380 to 0xc4071980
ohci_check_transfer: xfer=0xc4908050 checking transfer
ohci_non_isoc_done: xfer=0xc4908050 pipe=0xc46ee9b0 transfer done
TD(0xc4daec00) at 0x098cac00: -TOG1 delay=7 ec=0 cc=0
cbp=0x00000000 next=0x00000000 be=0x06d0c127
ohci_device_done: xfer=0xc4908050, pipe=0xc46ee9b0, error=0
_ohci_remove_qh: 0xc5d73380 from 0xc5d73380
ohci_setup_standard_chain: addr=2 endpt=0 sumlen=40 speed=2
ohci_setup_standard_chain: nexttog=1; data before transfer:
TD(0xc5d72100) at 0x0fd34100: -TOG0 delay=7 ec=0 cc=15
cbp=0x06d0c120 next=0x0fd34000 be=0x06d0c127
TD(0xc5d72000) at 0x0fd34000: -R-IN-TOG1 delay=7 ec=0 cc=15
cbp=0x06d0c128 next=0x0fd34500 be=0x06d0c147
TD(0xc5d72500) at 0x0fd34500: -OUT-TOG1 delay=1 ec=0 cc=15
cbp=0x00000000 next=0x00000000 be=0xffffffff
_ohci_append_qh: 0xc5d73280 to 0xc4071980
ohci_check_transfer: xfer=0xc4908050 checking transfer
ohci_non_isoc_done: xfer=0xc4908050 pipe=0xc46ee9b0 transfer done
TD(0xc5d72100) at 0x0fd34100: -TOG1 delay=7 ec=0 cc=0
cbp=0x00000000 next=0x00000000 be=0x06d0c127
ohci_device_done: xfer=0xc4908050, pipe=0xc46ee9b0, error=0
_ohci_remove_qh: 0xc5d73280 from 0xc5d73280
ohci_setup_standard_chain: addr=2 endpt=0 sumlen=8 speed=2
ohci_setup_standard_chain: nexttog=1; data before transfer:
TD(0xc5d73180) at 0x11a13180: -TOG0 delay=7 ec=0 cc=15
cbp=0x169941f0 next=0x11a13200 be=0x169941f7
TD(0xc5d73200) at 0x11a13200: -R-IN-TOG1 delay=1 ec=0 cc=15
cbp=0x00000000 next=0x00000000 be=0xffffffff
_ohci_append_qh: 0xc5d73100 to 0xc4071980
ohci_check_transfer: xfer=0xc5d84120 checking transfer
ohci_non_isoc_done: xfer=0xc5d84120 pipe=0xc46ee9b0 transfer done
TD(0xc5d73180) at 0x11a13180: -TOG1 delay=7 ec=0 cc=0
cbp=0x00000000 next=0x00000000 be=0x169941f7
ohci_device_done: xfer=0xc5d84120, pipe=0xc46ee9b0, error=22
_ohci_remove_qh: 0xc5d73100 from 0xc5d73100
ohci_setup_standard_chain: addr=2 endpt=1 sumlen=5 speed=2
ohci_setup_standard_chain: nexttog=0; data before transfer:
TD(0xc4dadd00) at 0x0a5f2d00: -OUT-TOG0 delay=1 ec=0 cc=15
cbp=0x1692c120 next=0x00000000 be=0x1692c124
_ohci_append_qh: 0xc4dae900 to 0xc4071900
ohci_check_transfer: xfer=0xc5d74050 checking transfer
ohci_non_isoc_done: xfer=0xc5d74050 pipe=0xc46ee9c4 transfer done
TD(0xc4dadd00) at 0x0a5f2d00: -OUT-TOG1 delay=1 ec=0 cc=0
cbp=0x00000000 next=0x00000000 be=0x1692c124
ohci_device_done: xfer=0xc5d74050, pipe=0xc46ee9c4, error=0
_ohci_remove_qh: 0xc4dae900 from 0xc4dae900
ohci_setup_standard_chain: addr=2 endpt=0 sumlen=8 speed=2
ohci_setup_standard_chain: nexttog=1; data before transfer:
TD(0xc4dad680) at 0x0a5f2680: -TOG0 delay=7 ec=0 cc=15
cbp=0x169a51f0 next=0x0173da80 be=0x169a51f7
TD(0xc40faa80) at 0x0173da80: -R-IN-TOG1 delay=1 ec=0 cc=15
cbp=0x00000000 next=0x00000000 be=0xffffffff
_ohci_append_qh: 0xc4dad180 to 0xc4071980
ohci_check_transfer: xfer=0xc5d95120 checking transfer
ohci_non_isoc_done: xfer=0xc5d95120 pipe=0xc46ee9b0 transfer done
TD(0xc4dad680) at 0x0a5f2680: -TOG1 delay=7 ec=0 cc=0
cbp=0x00000000 next=0x00000000 be=0x169a51f7
ohci_device_done: xfer=0xc5d95120, pipe=0xc46ee9b0, error=22
_ohci_remove_qh: 0xc4dad180 from 0xc4dad180
ohci_setup_standard_chain: addr=2 endpt=1 sumlen=4 speed=2
ohci_setup_standard_chain: nexttog=0; data before transfer:
TD(0xc5d73980) at 0x11a13980: -R-IN-TOG0 delay=1 ec=0 cc=15
cbp=0x16995120 next=0x00000000 be=0x16995123
_ohci_append_qh: 0xc4dac680 to 0xc4071900
ohci_check_transfer: xfer=0xc5d85050 checking transfer
ohci_non_isoc_done: xfer=0xc5d85050 pipe=0xc46ee9d8 transfer done
TD(0xc5d73980) at 0x11a13980: -R-IN-TOG1 delay=1 ec=0 cc=0
cbp=0x00000000 next=0x00000000 be=0x16995123
ohci_device_done: xfer=0xc5d85050, pipe=0xc46ee9d8, error=0
_ohci_remove_qh: 0xc4dac680 from 0xc4dac680
ohci_device_done: xfer=0xc5d85050, pipe=0xc46ee9d8, error=5
_ohci_remove_qh: 0xc4dac680 from 0xc4071900
ohci_device_done: xfer=0xc5d95120, pipe=0xc46ee9b0, error=5
_ohci_remove_qh: 0xc4dad180 from 0xc4071980
ohci_device_done: xfer=0xc5d74050, pipe=0xc46ee9c4, error=5
_ohci_remove_qh: 0xc4dae900 from 0xc4071900
ohci_device_done: xfer=0xc5d84120, pipe=0xc46ee9b0, error=5
_ohci_remove_qh: 0xc5d73100 from 0xc4071980

Regards,
Xiaofan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a276da400804241956r3a7759bp298c76ccdaf8eb76>