OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Using Usb As Device Driver, need input on driver code
Little_Goomba
post Aug 15 2005, 07:00 AM
Post #1





Group: Members
Posts: 31
Joined: 15-November 04
Member No.: 5,471



I'm trying to write some software that will allow me to program embedded controllers using the Z. I've got an unusual problem - I've gotten as far as being able to recognize the programmer, but as soon as I try to write a block of data to the controller, WHAM! Lockup. Here's where I could use some help. When I built libusb, the build enabled interrupt driven bulk data writes. Does anyone know if the USB controller in the 6000 allows for interrupt driven writes? Should I reprogram the application to use bulk writes?
I saw in the USB cables thread that someone else was getting lockup when trying to access a jukebox (I'll assume that's an MP3 player). Maybe this is something similair? I've been adding printf statements to the usb applications to try and get input on where the crash is occurring. Here's where I think the crash happens.

CODE
int usb_interrupt_write(usb_dev_handle *dev, int ep, char *bytes, int size,
    int timeout)
{
 /* Ensure the endpoint address is correct */
 return usb_interrupt_transfer(dev, ep & ~USB_ENDPOINT_IN, bytes, size,
 timeout);
}

crashes the system. Whazzup with that?
Thanks for your help, Zaurus experts!
Go to the top of the page
 
+Quote Post
Little_Goomba
post Aug 15 2005, 10:21 AM
Post #2





Group: Members
Posts: 31
Joined: 15-November 04
Member No.: 5,471



Got it! The TUSB2040 is not Interrupt friendly. When an interrupt is sent to this device, it chokes the 6000, and that's all. Sending data in bulk via software does the trick. But I still don't feel like an expert.

Summary: Don't write drivers that use the standard interrupt method of sending USB data.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd August 2014 - 01:36 PM