mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Merge branch 'bugfix/spi_lose_last_3_bytes_v4.2' into 'release/v4.2'
spi_master: fix an issue where master cannot correctly receive data when using DMA in halfduplex mode (v4.2) See merge request espressif/esp-idf!17379
This commit is contained in:
@ -125,12 +125,15 @@ void spi_hal_prepare_data(const spi_hal_context_t *hal)
|
|||||||
lldesc_setup_link(hal->dmadesc_rx, hal->rcv_buffer, ((hal->rx_bitlen + 7) / 8), true);
|
lldesc_setup_link(hal->dmadesc_rx, hal->rcv_buffer, ((hal->rx_bitlen + 7) / 8), true);
|
||||||
spi_ll_rxdma_start(hw, hal->dmadesc_rx);
|
spi_ll_rxdma_start(hw, hal->dmadesc_rx);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32
|
||||||
|
else {
|
||||||
//DMA temporary workaround: let RX DMA work somehow to avoid the issue in ESP32 v0/v1 silicon
|
//DMA temporary workaround: let RX DMA work somehow to avoid the issue in ESP32 v0/v1 silicon
|
||||||
if (hal->dma_enabled) {
|
if (hal->dma_enabled && !hal->half_duplex) {
|
||||||
spi_ll_rxdma_start(hw, 0);
|
spi_ll_rxdma_start(hw, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (hal->send_buffer) {
|
if (hal->send_buffer) {
|
||||||
if (!hal->dma_enabled) {
|
if (!hal->dma_enabled) {
|
||||||
|
Reference in New Issue
Block a user