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 7499b1a commit 14bb73bCopy full SHA for 14bb73b
libraries/SPI/src/SPI.cpp
@@ -122,6 +122,10 @@ void SPIClass::config(SPISettings settings)
122
{
123
memset((void *)&_config, 0x00, sizeof(am_hal_iom_config_t)); // Set the IOM configuration
124
_config.eInterfaceMode = AM_HAL_IOM_SPI_MODE;
125
+
126
+ if (settings.clockFreq > AM_HAL_IOM_MAX_FREQ)
127
+ settings.clockFreq = AM_HAL_IOM_MAX_FREQ;
128
129
_config.ui32ClockFreq = settings.clockFreq;
130
_config.eSpiMode = settings.dataMode;
131
_order = settings.bitOrder;
0 commit comments