control transfer cpu time.

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
ulao
Rank 4
Rank 4
Posts: 465
Joined: Mon Aug 25, 2008 8:45 pm

control transfer cpu time.

Postby ulao » Fri Jul 13, 2018 1:52 am

Does the MCU devote all its time when a control transfer comes in? Well, minus the usb interrupt. Because what I see is on control transfers, my normal code is halting. If the MCU must devote to the control transfer how is one to prepare the data for the interrupt transfer in the case of an incoming long control transfer. Is that is a caveat to v-usb? If that is the case then I need a start/end of control transfer flag.

example;

usb 8ms interrupte ( I now have 8 ms to play)....start my sensitive code...3 ms pass ...control transfer comes in (interrupts my code).... sensitive code is now busted.

I could scheduled my code if I knew one of two things.

1) When a SOF (keep alive) occurs. At this time I can not wire -d to the interrupt pin, it's too late. IS there a flag I can use or make?
2) Know when a Control transfer starts and ends. Or at least has occurred.

set occurred flag to 0. Do code. Did it occur? If true reject code result. But where in the ASM do I plug in this flag?

Edit: I read that there is a 1ms int. in v-usb but 8ms requires a response. If The USB interrupt is every 1ms but only 8ms requires a response. Then where is that in the ASM?

Return to “V-USB”

Who is online

Users browsing this forum: No registered users and 4 guests