Skip to content

Commit 7ad4982

Browse files
author
Nathan Seidle
committed
Change default SPI mode to 0 to match datasheet
"Data is latched on the rising edge of SCLK" - this is CPHA = 0. It's not clear what CPOL is but mode 3 is not CPHA = 1 which causes SPI to not work on some platforms (Artemis).
1 parent 20d57b8 commit 7ad4982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ICM_20948.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class ICM_20948_I2C : public ICM_20948
140140
// SPI
141141
#define ICM_20948_SPI_DEFAULT_FREQ 7000000
142142
#define ICM_20948_SPI_DEFAULT_ORDER MSBFIRST
143-
#define ICM_20948_SPI_DEFAULT_MODE SPI_MODE3
143+
#define ICM_20948_SPI_DEFAULT_MODE SPI_MODE0
144144

145145
// Forward declarations of SPIClass and SPI for board/variant combinations that don't have a default 'SPI'
146146
class SPIClass;

0 commit comments

Comments
 (0)