We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21985ca commit e6fcc14Copy full SHA for e6fcc14
cores/arduino/stm32/spi_com.c
@@ -131,13 +131,17 @@ uint32_t spi_getClkFreqInst(SPI_TypeDef * spi_inst)
131
/* SPI1, SPI4, SPI5 and SPI6. Source CLK is PCKL2 */
132
spi_freq = HAL_RCC_GetPCLK2Freq();
133
break;
134
+#if defined(SPI2_BASE) || defined (SPI3_BASE)
135
+#if defined SPI2_BASE
136
case (uint32_t)SPI2:
137
+#endif
138
#if defined SPI3_BASE
139
case (uint32_t)SPI3:
140
#endif
141
/* SPI_2 and SPI_3. Source CLK is PCKL1 */
142
spi_freq = HAL_RCC_GetPCLK1Freq();
143
144
145
default:
146
printf("CLK: SPI instance not set");
147
0 commit comments