Go Down

Topic: How to use USB in an ISR (solved) (Read 590 times) previous topic - next topic


May 24, 2018, 07:08 pm Last Edit: May 29, 2018, 06:29 pm by MikD
I have searched high and low in my quest for finding an ISR to process, 9600 Baud or in this range, USB data but in vain. Am I missing something?

I can see there are SERCOM handlers and I have an ISR running for a plain UART. But how about the USB?

Does anyone have a working example or can guide me where to look.



You realize that USB code is MUCH more complicated than UART.
The Zero code is in https://github.com/arduino/ArduinoCore-samd/tree/master/cores/arduino/USB


May 29, 2018, 06:27 pm Last Edit: May 29, 2018, 06:30 pm by MikD
Hello westfw

Thanks for the post. While not directly solving my problem it did made me search in a different way. While doing so I came across an, to me, unknown Arduino function: yield(); It solved my problem by scanning the SerialUSB inside my own version of yield(); even if this is not an ISR.


Go Up