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

cnlohr
Posts: 5
Joined: Mon Aug 08, 2016 9:27 pm

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

Postby cnlohr » Tue Aug 09, 2016 8:54 pm

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...

https://github.com/cnlohr/espusb

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.

pratik

Re: Need better interrupt access for Full-Speed USB

Postby pratik » Wed Aug 10, 2016 10:39 am

Hello,

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.
Attachments
8b-esp8266_interface_gpio_registers_release_15-11-2014.xls
(33 KiB) Downloaded 1302 times

cnlohr
Posts: 5
Joined: Mon Aug 08, 2016 9:27 pm

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

Postby cnlohr » Sun Aug 21, 2016 9:43 am

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.

pratik

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

Postby pratik » Mon Aug 22, 2016 1:42 pm

Yeah I know.
How are you accessing the registers? Using the register write APIs?

Who is online

Users browsing this forum: No registered users and 14 guests