ESP32(SPI): Disable the write side when reading is being done in DMA … (#1894)
* ESP32(SPI): Disable the write side when reading is being done in DMA mode * disable and re-enable MISO and MOSI in write and transfer methods * changelog
This commit is contained in:
parent
56d8d58443
commit
54ee364130
@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Fix I2S async-tx (#1833)
|
||||
- Fix PARL_IO async-rx (#1851)
|
||||
- SPI: Clear DMA interrupts before (not after) DMA starts (#1859)
|
||||
- SPI: disable and re-enable MISO and MOSI in `start_transfer_dma`, `start_read_bytes_dma` and `start_write_bytes_dma` accordingly (#1894)
|
||||
|
||||
### Removed
|
||||
|
||||
|
||||
@ -2032,6 +2032,11 @@ where
|
||||
tx.is_done();
|
||||
rx.is_done();
|
||||
|
||||
// re-enable the MISO and MOSI
|
||||
reg_block
|
||||
.user()
|
||||
.modify(|_, w| w.usr_miso().bit(true).usr_mosi().bit(true));
|
||||
|
||||
self.enable_dma();
|
||||
self.update();
|
||||
|
||||
@ -2082,6 +2087,11 @@ where
|
||||
|
||||
tx.is_done();
|
||||
|
||||
// disable MISO and re-enable MOSI
|
||||
reg_block
|
||||
.user()
|
||||
.modify(|_, w| w.usr_miso().bit(false).usr_mosi().bit(true));
|
||||
|
||||
self.enable_dma();
|
||||
self.update();
|
||||
|
||||
@ -2113,6 +2123,11 @@ where
|
||||
|
||||
rx.is_done();
|
||||
|
||||
// re-enable MISO and disable MOSI
|
||||
reg_block
|
||||
.user()
|
||||
.modify(|_, w| w.usr_miso().bit(true).usr_mosi().bit(false));
|
||||
|
||||
self.enable_dma();
|
||||
self.update();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user