We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc760b7 commit cd811f1Copy full SHA for cd811f1
libraries/SPI/src/SPI.cpp
@@ -53,6 +53,12 @@ void arduino::MbedSPI::beginTransaction(SPISettings settings) {
53
begin();
54
}
55
if (settings != this->settings) {
56
+ //If requested to set frequency above max, just set to max.
57
+ if(settings.getClockFreq() > AM_HAL_IOM_MAX_FREQ)
58
+ {
59
+ settings = SPISettings(AM_HAL_IOM_MAX_FREQ, settings.getBitOrder(), settings.getDataMode());
60
+ }
61
+
62
dev->format(8, settings.getDataMode());
63
dev->frequency(settings.getClockFreq());
64
this->settings = settings;
0 commit comments