Help - Search - Members - Calendar
Full Version: Using Usb As Device Driver
OESF Portables Forum > Everything Else > Archived Forums > Distros, Development, and Model Specific Forums > Model Specific Forums > Sharp Zaurus > 6000 - Tosa
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.

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,

crashes the system. Whazzup with that?
Thanks for your help, Zaurus experts!
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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2019 Invision Power Services, Inc.