We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f91acc commit aa21f4fCopy full SHA for aa21f4f
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