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
Hi gang,
I'm testing some existing SPI code on v2.0.6 of the core. It uses SPI_MODE1 (CPOL=0 and CPHA=1) and is failing... I can see on the 'scope that CPOL is 1, not 0.
If I use SPI_MODE2 instead, it works.
I suspect modes 1 and 2 are swapped?
Looking at am_hal_iom.h, the mode ordering (0,2,1,3) matches the ordering of the SPHA and SPOL bits in the IOM.MSPICFG register.
I'm wondering if we need to swap modes 1 and 2 when using the modes as defined in HardwareSPI.h?
Thanks,
Paul