I have developed a MIDI keyboard using the LPC55S69, and the USB MIDI device is based on the SDK's USB serial protocol, which I modified accordingly.
It can be correctly enumerated as a MIDI device on a PC, and the data transmission and reception seem to work normally.
However, I encountered a strange issue that I haven't been able to resolve, and I hope to get some help from everyone.
When using the WinAPI function on the PC to send data, if I send data frames of the same length, the LPC55S69 can receive the data normally. But if I send a short data frame first and then a longer one, the MCU fails to receive the longer data frame, and no USB interrupt is generated.
To be specific, sending 20 bytes using works fine, and sending 10 bytes also works fine. However, after sending a 10-byte frame, if I try to send a 20-byte frame, the MCU shows no response and doesn't enter the interrupt. But sending 10 bytes again works normally.
I would really appreciate any valuable suggestions from you all.
Alex Liang