diff --git a/ports/mimxrt10xx/common-hal/busio/SPI.c b/ports/mimxrt10xx/common-hal/busio/SPI.c index 0783171c95..88923fe06d 100644 --- a/ports/mimxrt10xx/common-hal/busio/SPI.c +++ b/ports/mimxrt10xx/common-hal/busio/SPI.c @@ -255,7 +255,7 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self, // The between-transfer-delay must be equal to the SCK low-time. // Setting it lower introduces runt pulses, while setting it higher // wastes time. - config.betweenTransferDelayInNanoSec = 1000000000 / config.baudRate / 2; + config.betweenTransferDelayInNanoSec = (1000000000 / config.baudRate) / 2; LPSPI_Deinit(self->spi); LPSPI_MasterInit(self->spi, &config, LPSPI_MASTER_CLK_FREQ);