-
Notifications
You must be signed in to change notification settings - Fork 39
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
Recvbuf needs to be aligned #13
Comments
I was really hopeful your hypothesis that the alignment of |
yeah I know. seems to make no difference. I am just about done with an
interrupt based multi midi ino example.
I did find as well that interval set to zero throws reset errors but while
using a 1 there in the interrupt case fixes it, there is no benefit to the
polling approach used in the examples.
Short version is that the polling approach is just horrible.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi the datasheet for the SAMD21 here https://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/Atmel-42181-SAM-D21_Datasheet.pdf page 836, says that the ADDR value must be aligned with the two least significant bits zero.
So in USBH_MIDI_dump.ino the bufMidi declaration should be
uint8_t bufMidi[64] __attribute__ ((aligned (4)));
Similarly, looking at USB_MIDI_converter_multi.ino, this leads to the declaration in usbh_midi.h
uint8_t recvBuf[MIDI_EVENT_PACKET_SIZE];
This also needs to be aligned per the datasheet.
I am not sure the implications of this. I am doing a deep dive on this code to sort out the dropped MIDI message problem, and just stumbled on it.
The text was updated successfully, but these errors were encountered: