File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
components/esp_driver_spi/src/gpspi Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -407,9 +407,13 @@ esp_err_t spi_slave_disable(spi_host_device_t host)
407407
408408static void SPI_SLAVE_ISR_ATTR spi_slave_uninstall_priv_trans (spi_host_device_t host , spi_slave_trans_priv_t * priv_trans )
409409{
410+ __attribute__((unused )) spi_slave_transaction_t * trans = (spi_slave_transaction_t * )priv_trans -> trans ;
411+ #if CONFIG_IDF_TARGET_ESP32
412+ if (spihost [host ]-> dma_enabled && (trans -> trans_len % 32 )) {
413+ ESP_EARLY_LOGW (SPI_TAG , "Use DMA but real trans_len is not 4 bytes aligned, slave may loss data" );
414+ }
415+ #endif
410416#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
411- spi_slave_transaction_t * trans = (spi_slave_transaction_t * )priv_trans -> trans ;
412-
413417 if (spihost [host ]-> dma_enabled ) {
414418 if (trans -> tx_buffer && (trans -> tx_buffer != priv_trans -> tx_buffer )) {
415419 free (priv_trans -> tx_buffer );
You can’t perform that action at this time.
0 commit comments