mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-24 11:10:23 +00:00
spi: Remove Slave TX/RX set bitlen not effective for ESP32-S2/C3/S3
Furthermore, RX_EOF_EN should only be set when SPI Slave is configured for segment transfer mode and the "ms_data_bitlen" field is configured to control the "IN_SUC_EOF" interrupt. Since "ms_data_bitlen" is not set anymore for S2, C3 and S3, "RX_EOF_EN" should be cleared.
This commit is contained in:
committed by
bot
parent
6fb126657a
commit
2bc4a0836f
@@ -71,8 +71,11 @@ void spi_slave_hal_prepare_data(const spi_slave_hal_context_t *hal)
|
||||
spi_ll_slave_set_rx_bitlen(hal->hw, hal->bitlen);
|
||||
spi_ll_slave_set_tx_bitlen(hal->hw, hal->bitlen);
|
||||
|
||||
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||
//SPI Slave mode on ESP32 requires MOSI/MISO enable
|
||||
spi_ll_enable_mosi(hal->hw, (hal->rx_buffer == NULL) ? 0 : 1);
|
||||
spi_ll_enable_miso(hal->hw, (hal->tx_buffer == NULL) ? 0 : 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
void spi_slave_hal_store_result(spi_slave_hal_context_t *hal)
|
||||
|
||||
Reference in New Issue
Block a user