Go Down

Topic: USB isWriteEnabled() function on SAMD? (Read 198 times) previous topic - next topic


Mar 21, 2019, 05:19 pm Last Edit: Mar 25, 2019, 03:03 am by pharaohamps
[EDIT - solved using a newer version of the core]

I'm working with the MIDIUSB library, and while it works very well I've got a nagging issue on the SAMD21.

The library works on both Due and Zero, but the Zero / SAMD21 will lock up the user application if connected to USB without an application on the host "listening" for MIDI.

Here's an example - if you compile and upload any of the examples in the MIDIUSB library that sends MIDI data over USB, the sketch will hang up if you plug the board into your computer without a MIDI application running.

Plug in USB, hang.
Plug in USB, open up something like MIDI Monitor or MIDI-OX, runs fine.

[EDIT - there is now a timeout counter in the send() function, and if there is no listener the library will time out and skip that message.]

Go Up