Go Down

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

MikD

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.

TIA

westfw

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


MikD

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

Thanks!

Go Up