Fix ESP32-S2 SPI when DMA is sometimes used
This commit is contained in:
parent
0d1649880f
commit
95cb5961d2
|
@ -357,6 +357,9 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_ou
|
|||
} else {
|
||||
hal->dma_enabled = 0;
|
||||
burst_length = sizeof(hal->hw->data_buf);
|
||||
// When switching to non-DMA, we need to make sure DMA is off. Otherwise,
|
||||
// the S2 will transmit zeroes instead of our data.
|
||||
spi_ll_txdma_disable(hal->hw);
|
||||
}
|
||||
|
||||
// This rounds up.
|
||||
|
|
Loading…
Reference in New Issue