Wednesday, October 17, 2007

PICkit 2 and PICDEM FS USB Demo Board Under FreeBSD

With the help of Hans, I am able to get the PICDEM FS USB Demo Board demo mode (interrupt transfer) work under FreeBSD using his USB stack under FreeBSD 6.2 Stable. This is a byproduct of getting the PICkit 2 work again under FreeBSD.

One patch required is the file "ugen.c". In the function "ugen_open_pipe_read()",
find the line "case UE_INTERRUPT:" and then some lines further down you will find:
/* first transfer clears stall */
sce->read_stall = 1;

Chaneg this to "0".
Then recompile and install the "ugen" module and/or kernel.

Links to the FreeBSD USB Mailing List thread:
http://lists.freebsd.org/pipermail/freebsd-usb/2007-October/004057.html

http://lists.freebsd.org/pipermail/freebsd-usb/2007-October/004063.html

The bootloader (bulk transfer) is not working yet.
http://lists.freebsd.org/pipermail/freebsd-usb/2007-October/004058.html

No comments: