mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(driver_spi): added warning for esp32 dma translength unalign to 4 byte
Closes https://github.com/espressif/esp-idf/issues/2085
This commit is contained in:
@@ -407,9 +407,13 @@ esp_err_t spi_slave_disable(spi_host_device_t host)
|
||||
|
||||
static void SPI_SLAVE_ISR_ATTR spi_slave_uninstall_priv_trans(spi_host_device_t host, spi_slave_trans_priv_t *priv_trans)
|
||||
{
|
||||
__attribute__((unused)) spi_slave_transaction_t *trans = (spi_slave_transaction_t *)priv_trans->trans;
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
if (spihost[host]->dma_enabled && (trans->trans_len % 32)) {
|
||||
ESP_EARLY_LOGW(SPI_TAG, "Use DMA but real trans_len is not 4 bytes aligned, slave may loss data");
|
||||
}
|
||||
#endif
|
||||
#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
|
||||
spi_slave_transaction_t *trans = (spi_slave_transaction_t *)priv_trans->trans;
|
||||
|
||||
if (spihost[host]->dma_enabled) {
|
||||
if (trans->tx_buffer && (trans->tx_buffer != priv_trans->tx_buffer)) {
|
||||
free(priv_trans->tx_buffer);
|
||||
|
||||
Reference in New Issue
Block a user