-
-
Notifications
You must be signed in to change notification settings - Fork 86
SPI mode and bit order not set correctly #12
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
Comments
Looking into this a bit further, I'm not sure why this would be the mask setting. BRDV is only two bits (b3, b2), so I think the mask should actually be I'm experimenting with setting the registers directly, but haven't had any luck thus far. |
Aha, got it working... I was using the SPI0 registers, but should have been using SPI1. Adding the following after calling
|
Ensure that sensible SPI settings are configured after `SPI.begin()`
Closing this issue since it is heavily outdated, see #45 . |
Ensure that sensible SPI settings are configured after `SPI.begin()` Former-commit-id: fe8b469
See this line in SPI.cpp
spcmd0 &= !(((uint32_t)0xFF) << 2);
should bespcmd0 &= ~(((uint32_t)0xFF) << 2);
The logical not makes the mask 0 and wipes out the earlier settings. Should be a bitwise not to make the mask FFFFFC03.
The text was updated successfully, but these errors were encountered: