Search found 454 matches

Go to advanced search

by ulao
Tue Nov 14, 2017 6:38 pm
Forum: V-USB
Topic: Simultaneous In and Out interrupt transfers
Replies: 6
Views: 153

Re: Simultaneous In and Out interrupt transfers

I have tried that but it didn't work out well for all systems. There is too much overhead in the OS that many times the application will be delayed and end up overrunning. One thing that helped was to set the thread to high priority but still had issues. If you close all other application it also wi...
by ulao
Tue Nov 14, 2017 6:36 pm
Forum: V-USB
Topic: v-usb not really good for control transfers after all.
Replies: 2
Views: 61

Re: v-usb not really good for control transfers after all.

Idea will not work because this function is only called based on the interrupt. I'd have to step back further. Unsure where to look at the moment, abandoning this ideas for now.
by ulao
Fri Nov 10, 2017 7:49 pm
Forum: V-USB
Topic: Simultaneous In and Out interrupt transfers
Replies: 6
Views: 153

Re: Simultaneous In and Out interrupt transfers

Oh... no this is not well documented. Personally I think a disclaimer should have been put up (or maybe there is). V-usb loosely supports data input. I guess it is sort of expect, being this is a FM implementation of a hardware protocol but yeah, its not designed to preform as well as a hardware usb...
by ulao
Fri Nov 10, 2017 6:38 pm
Forum: V-USB
Topic: check if USB is idle
Replies: 2
Views: 148

Re: check if USB is idle

check for the arrest usbPoll(); //issue at least one for the check below if (USB_INTR_PENDING & (1<<USB_INTR_PENDING_BIT)) // Usbpoll() collided with data packet { uint8_t ctr; // loop takes 5 cycles asm volatile( " ldi %0,%1 \n\t" "loop%=: sbis %2,%3 \n\t" " ldi %0,%1 \...
by ulao
Fri Nov 10, 2017 6:32 pm
Forum: V-USB
Topic: Simultaneous In and Out interrupt transfers
Replies: 6
Views: 153

Re: Simultaneous In and Out interrupt transfers

Yeah, not going to happen. This is an over,kill but explains why https://forums.obdev.at/viewtopic.php?f=8&t=11102 The v-usb consumes the entire CPU to handle NAK until the driver is ready. You will have no choice but to wait for it to do its thing before sending out. Simultaneous is not achieva...
by ulao
Fri Nov 10, 2017 6:23 pm
Forum: V-USB
Topic: v-usb not really good for control transfers after all.
Replies: 2
Views: 61

Re: v-usb not really good for control transfers after all.

One small addition. It may be wise to check for the interrupt arrest before enabling. usbPoll(); //issue at least one for the check below if (USB_INTR_PENDING & (1<<USB_INTR_PENDING_BIT)) // Usbpoll() collided with data packet { uint8_t ctr; // loop takes 5 cycles asm volatile( " ldi %0,%1 ...
by ulao
Fri Nov 10, 2017 5:59 pm
Forum: V-USB
Topic: v-usb not really good for control transfers after all.
Replies: 2
Views: 61

v-usb not really good for control transfers after all.

If anyone has looked in to the v-usb on the wire you will learn a few things... sending the NACK consumes all the CPU time.and this can go on for quite a while. The host only stops sending IN packets right before the end of the frame, to avoid colliding with the 1 ms keep alive pulse. This finally l...
by ulao
Fri Oct 27, 2017 4:01 pm
Forum: V-USB
Topic: Is Data IN endpoint required for HID devices?
Replies: 1
Views: 139

Re: Is Data IN endpoint required for HID devices?

I'm getting confused by this as well. See my latest post. The EP0 I though had a default in? Thus no need to make another. I do know in some uses of v-usb it is absolutely needed to create another pipe. https://stackoverflow.com/questions/14129112/interfacing-a-libusb-device-powered-by-v-usb-library...
by ulao
Sun Oct 08, 2017 7:10 pm
Forum: V-USB
Topic: Using Pin change interrupt instead of INT0
Replies: 2
Views: 132

Re: Using Pin change interrupt instead of INT0

I find this rather interesting, could anyone explain the advantages/disadvantages or reason for wanting to do so? I'm thinking it would allow the device to sync to the usb poll better but not sure I follow the intention.
by ulao
Fri Sep 29, 2017 1:54 pm
Forum: V-USB
Topic: check if USB is idle
Replies: 2
Views: 148

Re: check if USB is idle

Been going down this road all month.... Do you use any control transfers? If so things get twice as hard. Assuming you have a normal interrupt based USB poll every 8-10ms you can tie everything to the usbpoll. Somewhere in your code you should have a line like so. while (!usbInterruptIsReady()) usbP...
by ulao
Fri Sep 29, 2017 1:47 pm
Forum: V-USB
Topic: USB\DEVICE_DESCRIPTOR_FAILURE
Replies: 1
Views: 146

Re: USB\DEVICE_DESCRIPTOR_FAILURE

added a 1k5 ohm pullup resistor to D- and 1m ohm pullup resistor to D+. Using the latest code examples that will not work. Or maybe you just failed to explain it right? The 1k5 goes from D- to the (normally middle pin) pull up pin. The Driver turns this pull up on and off. It may work with the righ...
by ulao
Wed Aug 23, 2017 4:54 am
Forum: V-USB
Topic: output report go right to usbfunctinowrite?
Replies: 6
Views: 349

Re: output report go right to usbfunctinowrite?

Turns out I must have had a corrupt, partial or old version of the driver. I had no reason to suspect that but changing a define blew up the code. So after I re downloaded to fix that I figure I better come back to this bug. Sure enough that also fixes this issue.
by ulao
Sat Aug 19, 2017 1:52 am
Forum: V-USB
Topic: output report go right to usbfunctinowrite?
Replies: 6
Views: 349

Re: output report go right to usbfunctinowrite?

I did as you suggested but still have the same issue? What can I look at to further this investigation.
by ulao
Mon Aug 14, 2017 3:44 am
Forum: V-USB
Topic: output report go right to usbfunctinowrite?
Replies: 6
Views: 349

Re: output report go right to usbfunctinowrite?

Looks like we may have another bug here. if(usbRxToken < 0x10){ /* endpoint number in usbRxToken */ change it to this: if(usbRxToken == USBPID_OUT){ /* endpoint number in usbRxToken*/ so this works but breaks control sets where no_msg is used. After more headaches I noticed that the return is causin...
by ulao
Mon Aug 14, 2017 1:47 am
Forum: V-USB
Topic: output report go right to usbfunctinowrite?
Replies: 6
Views: 349

Re: output report go right to usbfunctinowrite?

Ok I finally found this Using Interrupt- and Bulk-Out endpoints Interrupt- and Bulk-Out endpoints are used to send stream type data to the device. When the host sends a chunk of data on the endpoint, the function usbFunctionWriteOut() is called. If you use more than one interrupt- or bulk-out endpoi...

Go to advanced search

cron