We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
arduino
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
2 parents 5c3f7f3 + aa21f4f commit 1a7d8d0Copy full SHA for 1a7d8d0
libraries/SPI/SPI.cpp
@@ -94,8 +94,8 @@ void SPIClass::config(SPISettings settings)
94
_p_sercom->disableSPI();
95
96
uint32_t clock_freq = settings.getClockFreq();
97
- if (clock_freq > F_CPU/2) {
98
- clock_freq = F_CPU/2;
+ if (clock_freq > SERCOM_FREQ_REF/SPI_MIN_CLOCK_DIVIDER) {
+ clock_freq = SERCOM_FREQ_REF/SPI_MIN_CLOCK_DIVIDER;
99
}
100
101
_p_sercom->initSPI(_padTx, _padRx, SPI_CHAR_SIZE_8_BITS, getBitOrder(settings));
0 commit comments