Skip to content

Commit

Permalink
fix(hal): force spiTransaction to update clock line immediately (#9221)…
Browse files Browse the repository at this point in the history
… (#9333)
  • Loading branch information
and3rson authored Mar 5, 2024
1 parent f27971e commit 629ffc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cores/esp32/esp32-hal-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,11 @@ void spiTransaction(spi_t * spi, uint32_t clockDiv, uint8_t dataMode, uint8_t bi
spi->dev->ctrl.wr_bit_order = 1;
spi->dev->ctrl.rd_bit_order = 1;
}
#if CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3
// Sync new config with hardware, fixes https://github.com/espressif/arduino-esp32/issues/9221
spi->dev->cmd.update = 1;
while (spi->dev->cmd.update);
#endif
}

void spiSimpleTransaction(spi_t * spi)
Expand Down

0 comments on commit 629ffc5

Please sign in to comment.