Skip to content

Commit 5d9cfba

Browse files
committed
fix(hal): force spiTransaction to update clock line immediately (espressif#9221)
1 parent aed7b4f commit 5d9cfba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: cores/esp32/esp32-hal-spi.c

+5
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,11 @@ void spiTransaction(spi_t * spi, uint32_t clockDiv, uint8_t dataMode, uint8_t bi
11151115
spi->dev->ctrl.wr_bit_order = 1;
11161116
spi->dev->ctrl.rd_bit_order = 1;
11171117
}
1118+
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3
1119+
// Sync new config with hardware, fixes https://github.com/espressif/arduino-esp32/issues/9221
1120+
spi->dev->cmd.update = 1;
1121+
while (spi->dev->cmd.update);
1122+
#endif
11181123
}
11191124

11201125
void spiSimpleTransaction(spi_t * spi)

0 commit comments

Comments
 (0)