Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB-Midi is not sent to UART queue once the UART queue becomes unblocked again. #93

Closed
Windfisch opened this issue Jul 10, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Windfisch
Copy link
Owner

Sending a megaFM firmware via amidi causes the update to fail, because timing is not upheld. Sending firmware sysexes usually requires to wait a certain time between two sysexes (so the flash can be written).

amidi  -p hw:3,0,2 --send=MEGAfm\ firmware/megaFM_R2.3.syx -i 1000

is supposed to send:

F0 data data data data data data data data data F7
<1 sec pause>
F0 data data data data data data data data data F7
...

however, it does send:

F0 data data data data data
<1 sec pause>
data data data data F7 F0 data data data data
<1 sec pause>
...

This is because the usb ISR stops reading midi packets from usb (so they get queued in the usb host) once a queue gets full, but is not informed when the queue gets non-full again.

@Windfisch Windfisch added the bug Something isn't working label Jul 10, 2022
@Windfisch Windfisch added this to the general operation milestone Jul 10, 2022
Windfisch added a commit that referenced this issue Jul 18, 2022
Fixes #93.

Essentially, when an UART queue becomes full, the USB task stops sending.
When the queue becomes non-full again, however, it did not start sending again,
until another USB interrupt was received for an unrelated reason. This caused
timing issues that break flashing firmwares via sysex, for example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant