You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the default (mode 0) everything works fine, however, after I change to mode 3, the CS goes high one clock cycle early and there are another 7 (wtf?) clock cycles.
Im a bit puzzled...
According to RM0386, it looks like the setDataMode function sets the correct bits in the SPI_CR1 register...
The text was updated successfully, but these errors were encountered:
I haven't looked at a solution in detail, but probably the setDataMode() function should take care of disabling the peripheral while changing the setting.
The solution by @chris-durand works well. In addition, we had to add __DSB().
This is what a complete lambda inside a configuration handler could look like:
I'm trying to use SPI in Mode 3 on STM32F469, like this:
Details (click to see complete
main.cpp
)In the default (mode 0) everything works fine, however, after I change to mode 3, the CS goes high one clock cycle early and there are another 7 (wtf?) clock cycles.
Im a bit puzzled...
According to RM0386, it looks like the
setDataMode
function sets the correct bits in theSPI_CR1
register...The text was updated successfully, but these errors were encountered: