Yes, I managed to fix this.
The issue is that the code is getting stuck in the while loop in the write_packed function.
Here is my fix:
I added a condition so the code can exit the loop
Then I determined that the issue was due to the SysEx...
Just did more tests and unfortunately, the above solution does not work when sending SysEx messages from the USBHost.
The case where tx2 >= tx_max && tx1 >= tx_max is not handled in the function above, which leads to an infinite loop. Hopefully...
After further troubleshooting, I have narrowed it down to this code being stuck in a loop in this function in midi.cpp, where tx2 == tx_max == 16, and hence it was not matching any of the conditions.
I'm testing a basic code sending MIDI via usbHost on a Teensy 4.1 (lets call this the controller).
// Simple test of USB Host
// This example is in the public domain