gnupic: Re: [gnupic] USB code, PICDEM FS USB and Linux


Previous by date: 3 Mar 2006 19:17:03 +0000 Re: [gnupic] USB code, PICDEM FS USB and Linux, Ben Dugan
Next by date: 3 Mar 2006 19:17:03 +0000 Re: [gnupic] USB code, PICDEM FS USB and Linux, Ben Dugan
Previous in thread: 3 Mar 2006 19:17:03 +0000 Re: [gnupic] USB code, PICDEM FS USB and Linux, Ben Dugan
Next in thread: 3 Mar 2006 19:17:03 +0000 Re: [gnupic] USB code, PICDEM FS USB and Linux, Ben Dugan

Subject: RE: [gnupic] USB code, PICDEM FS USB and Linux
From: "Bradley Minch" ####@####.####
Date: 3 Mar 2006 19:17:03 +0000
Message-Id: <280CB384F3297641AB0C74674FB22A7D0646541A@OLINEXVS01.olin.edu>

The host timing out waiting for the PIC to complete the status phase of 
the control transfer, which for this type of request is a zero-length 
data packet.  That is what these four lines of code do (i.e., set the
byte count, BD0IBC, to zero, and transfer ownership of the EP0 IN buffer
back to the SIE.

Brad Minch.

-----Original Message-----
From: Ben Dugan ####@####.####
Sent: Fri 3/3/2006 1:14 PM
To: ####@####.####
Subject: Re: [gnupic] USB code, PICDEM FS USB and Linux
 
Alessandro,

I have been working more on sending to the picdem, using vendor
requests. Its working well for my purposes. The VendorRequests code you
put in usb-test.asm was very helpful getting me started on this.

I had been getting a timeout error from libusb when I sent vendor
requests to the board, even though the requests were working (that is, I
could get data to the board as I'd hoped.) I was thinking that the host
was waiting for some sort of acknowledgement, so I copied some lines
from elsewhere in the Minch code and it no longer times out. I'm noting
them here in case its of interest to you:

VendorRequests
	banksel	USB_buffer_data
	movf	USB_buffer_data+bRequest, W, BANKED
	select
		case 0x01
			banksel	demo_buffer
			movf	USB_buffer_data+wValue, W, BANKED
			movwf	demo_buffer+0, BANKED
			movf	USB_buffer_data+wValueHigh, W, BANKED
			movwf	demo_buffer+1, BANKED

			movf	USB_buffer_data+wIndex, W, BANKED
			movwf	demo_buffer+2, BANKED
			movf	USB_buffer_data+wIndexHigh, W,BANKED
			movwf	demo_buffer+3, BANKED

*			movlw		0x0
*			movwf		BD0IBC, BANKED			
*			movlw		0xC8
*			movwf		BD0IST, BANKED			
			break

The four *'ed lines seem to eliminate the timeout error.

Ben


---------------------------------------------------------------------
To unsubscribe, e-mail: ####@####.####
For additional commands, e-mail: ####@####.####



Previous by date: 3 Mar 2006 19:17:03 +0000 Re: [gnupic] USB code, PICDEM FS USB and Linux, Ben Dugan
Next by date: 3 Mar 2006 19:17:03 +0000 Re: [gnupic] USB code, PICDEM FS USB and Linux, Ben Dugan
Previous in thread: 3 Mar 2006 19:17:03 +0000 Re: [gnupic] USB code, PICDEM FS USB and Linux, Ben Dugan
Next in thread: 3 Mar 2006 19:17:03 +0000 Re: [gnupic] USB code, PICDEM FS USB and Linux, Ben Dugan


Powered by ezmlm-browse 0.20.