Skip to content

Commit 1f03867

Browse files
authored
fix(hal): force spiTransaction to update clock line immediately (backport of #9333) (#10697)
1 parent 4301639 commit 1f03867

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cores/esp32/esp32-hal-spi.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,11 @@ void spiTransaction(spi_t * spi, uint32_t clockDiv, uint8_t dataMode, uint8_t bi
11351135
spi->dev->ctrl.wr_bit_order = 1;
11361136
spi->dev->ctrl.rd_bit_order = 1;
11371137
}
1138+
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3
1139+
// Sync new config with hardware, backported from https://github.com/espressif/arduino-esp32/pull/9333
1140+
spi->dev->cmd.update = 1;
1141+
while (spi->dev->cmd.update);
1142+
#endif
11381143
}
11391144

11401145
void spiSimpleTransaction(spi_t * spi)

0 commit comments

Comments
 (0)