PDA

View Full Version : how to respond to EP1 interrupt requsts?



locko
- 25th June 2008, 23:19
OK, I give up..... has anyone got any experiance of handling interrupt transfers using the microchip USB framework code, USB18.asm etc.

I have been reading through the files (on and off for 2 weeks), trying to break them down, but the framework seems to be geared only for EP0 std requests, HID and CDC stuff but not interrupt transfers.

My device enumerates fine and I was able to re-write some of the assembler to reply to a specific class request, but this last part is killing me.
All I have left is to be able to detect an EP1_IN interrupt request and send 7 bytes back to the host via EP1_IN.

I am interfacing to existing software (process monitorring) so have no control over the host side of things.

Some pointers in the right direction, thoughts, ideas or a link to another framework that can handle interrupt transfers would be great.

Thanks Paul

skimask
- 26th June 2008, 04:55
http://www.picbasic.co.uk/forum/showthread.php?t=5418&highlight=learn

Darrel Taylor
- 26th June 2008, 06:06
Nope,

I'm pretty sure there's nothing in mister-e's USBdemo that'll help with EP1_IN interrupt requests.

And I have no better answers.
<br>

locko
- 26th June 2008, 08:45
Thanks Skimask, the demo was fantastic - I used it as my jump point to get in to USB but as DT says, there is nothing for interrupt transfers.

Thanks for the replies guys, it looks like I may be beat by this one. If I find a way, I will post here but its not looking good.

Paul

skimask
- 26th June 2008, 14:48
Thanks Skimask, the demo was fantastic - I used it as my jump point to get in to USB but as DT says, there is nothing for interrupt transfers.
Ya, I know, but didn't know if you had seen that thread or not. It's what got me started with the USB.

DaveC3
- 27th June 2008, 23:08
Paul

Up to now I have only used one endpoint. I believe you set up your device in the descriptor file. You tell it the number of interfaces you want, the number of endpoints, in the endpoint descriptor you tell the type of transfer and so on.

Then in the report descriptor you would set the packet size type of data and so on.

In PBP you would listen for that endpoint "USBIN X,buffer,cnt, goto label" (X being the endpoint number 1,2 etc). The PC sends endpoint "0" PBP endpoint is 1

Check out the USB18.inc file

I am not an expert but have made many USB devices and written custom descriptors.


Dave

locko
- 28th June 2008, 10:27
Hi Dave,
Thanks for the reply.


Paul

Up to now I have only used one endpoint. I believe you set up your device in the descriptor file. You tell it the number of interfaces you want, the number of endpoints, in the endpoint descriptor you tell the type of transfer and so on.

Got that far. My descriptor is set for 1 interface and endpoint1in is set for 8 byte buffer length and interrupt.



Then in the report descriptor you would set the packet size type of data and so on.

Not sure about this one. I have no report descriptor. I have made other HID projects and see that endpoint 1 has a report descriptor, but I thought that was due to the 'get_report' is a control transfer that comes in via the setup packet and not as in interrupt request on the USTAT. Do you have any further details on this?



In PBP you would listen for that endpoint "USBIN X,buffer,cnt, goto label" (X being the endpoint number 1,2 etc). The PC sends endpoint "0" PBP endpoint is 1

Check out the USB18.inc file

I am not an expert but have made many USB devices and written custom descriptors.


Dave

Got to love the USB18 file..... I have been reading it over and over for a few weeks now and none of the functions deal with interrupt requests.
I will try to use PBP to setup and initialize the endpoint buffer descriptor in memory and then read the USTAT for an ep01_in request and then set uown back to the sie etc.

Should be able to get some time this weekend to try a few things.

Thank again,

Paul