Skip to content

Commit

Permalink
fix(hal): force spiTransaction to update clock line immediately (back…
Browse files Browse the repository at this point in the history
…port of #9333)
  • Loading branch information
and3rson committed Dec 9, 2024
1 parent 4301639 commit 7bc4016
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 @@ -1135,6 +1135,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, backported from https://github.com/espressif/arduino-esp32/pull/9333
spi->dev->cmd.update = 1;
while (spi->dev->cmd.update);
#endif
}

void spiSimpleTransaction(spi_t * spi)
Expand Down

0 comments on commit 7bc4016

Please sign in to comment.