PICDEM FS USB Demo under FreeBSD with HPS Stack

Xiaofan Chen xiaofanc at gmail.com
Tue Oct 16 05:47:50 PDT 2007


On 10/13/07, Xiaofan Chen <xiaofanc at gmail.com> wrote:
> Today I checked the Demo mode of PICDEM FS USB demo board.
> it does not work either. Again this uses interrupt transfer.

This is with the latest HPS USB stack and 6.2 Stable.

On 10/16/07, Hans Petter Selasky <hselasky at c2i.net> wrote:
> On Saturday 13 October 2007, Xiaofan Chen wrote:
> > On 10/13/07, Hans Petter Selasky <hselasky at c2i.net> wrote:

> In the file "ugen.c" in the function "ugen_open_pipe_read()" you will find
> a "case UE_INTERRUPT:". Some lines further down you will find:
>
>                   /* first transfer clears stall */
>                   sce->read_stall = 1;
>
> This you can set to "0". Then recompile and install the "ugen" module and/or
> kernel.
>
> Does your USB hardware work now ?
>

This also solved the problem with PICDEM FS USB demo board.

Thanks!

===[mcuee] ~/Desktop/build/fsusb/Demo # sudo ./fsusb_demo --readpot
Locating Microchip(tm) PICDEM(tm) FS USB Demo Board (vendor
0x04d8/product 0x000c)
usb_set_debug: Setting debugging level to 255 (on)
setting USB debug on by adding usb_set_debug(255)
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/ugen1 on /dev/usb1
usb_os_find_devices: Found /dev/ugen0 on /dev/usb1
usb_control_msg: 128 6 512 0 0xbfbfe9a8 8 1000
usb_control_msg: 128 6 512 0 0x8051040 41 1000
skipped 1 class/vendor specific interface descriptors
usb_control_msg: 128 6 513 0 0xbfbfe9a8 8 1000
usb_control_msg: 128 6 513 0 0x804b120 32 1000
usb_control_msg: 128 6 512 0 0xbfbfe9a8 8 1000
usb_control_msg: 128 6 512 0 0x804b160 32 1000
Found USB PICDEM FS USB Demo Board as device '/dev/ugen1' on USB bus /dev/usb1
Communication established.
answer was correct!
Onboard firmware version is 1.0
Potentiometer now reads 263
usb_os_close: closing endpoint 4


Xiaofan


More information about the freebsd-usb mailing list