Page 1 of 1

Invalid slave VSPI transaction on ESP32-WROVER

Posted: Wed Nov 07, 2018 10:50 am
by bjauny
Hi,

Using a ESP32 WROVER as a slave with esp-idf v3.0 I'm doing SPI transactions using VSPI and DMA channel 1. Frequently I observe the following behavior:

- SPI interrupt TRANS_DONE triggers
- slv_rd_bit.slv_rdata_bit is set to 0
- the rx buffer doesn't contain the expected data
- host->hw->dma_rx_status seems to indicate that the DMA FIFO is not empty

On a nominal case, slv_rd_bit.slv_rdata_bit has a non zero value and the transaction structure I get from spi_slave_get_trans_result is correct but in this case the size of the transaction is set to 0 and the data can't be used.

Im' using the spi_slave_transmit API to bundle the spi_slave_queue_trans and spi_slave_get_trans_result calls.

Is there a reason this could happen? The master is setup with a 16MHz clock, and the mode is 0.

Thanks.