Page 1 of 1

【Resolved】Need better interrupt access for Full-Speed USB

Posted: Tue Aug 09, 2016 8:54 pm
by cnlohr
Just to point it out - I do have my ESP8266/ESP8285 communicating at low-speed USB, and I can do things like make it enumerate as a mouse and flash it over the USB interface...

Though I am still not 100% sure I can get full-speed USB working, but I think I can so long as I can minimize the latency between the GPIO interrupt firing and code execution. Currently there is a very, very long time spent within the interrupt handler code in the Espressif SDK.

Is it possible to release the details of how to put my own code in the interrupt vector for the GPIO interrupt instead of routing through the SDK? Additionally, if there is any way to set up the GPIO as an NMI that would be helpful (though not required) since USB does seem to gracefully re-try transmissions.

Re: Need better interrupt access for Full-Speed USB

Posted: Wed Aug 10, 2016 10:39 am
by pratik

What kind of time delay are you getting between GPIO edge transition and ISR entry?
Also, note that high frequency, high priority interrupts may disrupt core Wi-Fi related routines too often, so do make sure that the CPU is not occupied for too long with interrupts when implementing GPIO interrupt based serial interface!

Find register description for GPIOs attached.

Re: 【Resolved】Need better interrupt access for Full-Speed USB

Posted: Sun Aug 21, 2016 9:43 am
by cnlohr
Sorry, I thought this thread was put away :(

So, it turns out the problem is that whenever the processor reads any of the registers behind the AHB? bus, it takes something like 17 cycles, which is just too much for USB. Unless there's some other side channel - someone else suggested maybe multichannel SDIO or something to ninja the data into RAM, it's not possible to transfer the data from the GPIO registers in time.

Re: 【Resolved】Need better interrupt access for Full-Speed USB

Posted: Mon Aug 22, 2016 1:42 pm
by pratik
Yeah I know.
How are you accessing the registers? Using the register write APIs?