We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 586319c commit a80fd4fCopy full SHA for a80fd4f
libraries/SPI/src/utility/spi_com.c
@@ -214,7 +214,7 @@ static uint32_t compute_disable_delay(spi_t *obj)
214
SPI_HandleTypeDef *handle = &(obj->handle);
215
216
prescaler = 1 << ((handle->Init.BaudRatePrescaler >> SPI_CFG1_MBR_Pos) + 1);
217
- disable_delay = ((prescaler * 1000000) / spi_freq) / 2;
+ disable_delay = (((prescaler * 1000000) / spi_freq) / 2) + 1;
218
return disable_delay;
219
}
220
#endif
0 commit comments