(Newbie) Question regarding Interrupt dependency on USB comms (Teensy++2)

Status
Not open for further replies.
Hi everyone

Question: What impact on USB communication between Teensy and host PC is to be expected if interrupts are globally disabled for significant periods of time (multiple seconds)?

Context:
I have been developing a retro-computing project using the Teensy++2 for a while now and really enjoy working with this fabulous little device. The support available in the Teensy documentation is also terrifically helpful - thank you for making this available!

In my project, the Teensy is effectively providing a hardware interface to a PC-based emulator of an 80's micro (a Sinclair QL) via the virtual COM port/USB, which are not otherwise available through the SW emulator. The overall design involves sending command messages to the Teensy via USB, which actions the requests and responds in due course. I designed a Command/Response protocol to support this communication.

So far, the nature of the hardware facility being provided by the Teensy (a QL compatible Network port) - being packet-based - works very nicely, with network activities (2-80us long) being interleaved carefully with responses back to the listening host PC/Emulator via USB.

During the timing-sensitive parts of network activity, I disable interrupts for short intervals (few uS each). This seems to work well without appearing to impact any pending USB reception (which is read between network packets.)

The next hardware facility I plan for add to the Teensy however is not packet-based, but more akin to audio-streaming (needn't be audio, but regular sampling at atleast 20k p.s. - 50uS intervals)

To accommodate larger sets of samples (several seconds in length), I plan to add an SPI-based SRAM to the project (128kx8) to store the samples before forwarding in batches back to the host PC/Emulator.

Ideally, I'd prefer to interleave USB packet responses between samples (or rather, batches of samples), but of course there is insufficient time (50uS) between samples to achieve that, hence teh need to store the entire sample set in an external memory before forwarding via USB en-masse.

To avoid significant jitter on the sampling, I planned to disable interrupts during the sampling time-window.

So, my question, as above - if interrupts are disabled globally for a few seconds, what do we expect to happen to the USB connection? More generally, what depencies does USB on the Teensy place on interrupts?

I've read as much as I can find around streaming large data sets via USB from the Teensy (though most articles are naturally focused on the newer 32-bit models) and also tried to understand the Teensy's usb_serial source to answer my questions around USB/Interrupt behaviour, but am still unclear.

Any thoughts most welcome - please feel free to point me to any pre-existing threads on related topics that I may have missed in my research.

Regards and thanks.
 
Status
Not open for further replies.
Back
Top