ESP32 spi_device_queue_trans error

tatulea
Posts: 5
Joined: Wed Feb 06, 2019 12:39 pm

ESP32 spi_device_queue_trans error

Postby tatulea » Wed Feb 06, 2019 12:54 pm

Hi,

I am trying to read 3584 bytes from SPI, but I got "E (10547) spi_master: spi_device_queue_trans(782): txdata transfer > host maximum" and I don't know why.

My SPI configuration is this:

Code: Select all

spi_bus_config_t spi_bus_cfg = {
    .mosi_io_num=MOSI_PIN,
    .miso_io_num=MISO_PIN,
    .sclk_io_num=SCLK_PIN,
    .quadwp_io_num=-1,
    .quadhd_io_num=-1,
    .max_transfer_sz=3585 * 8
};

spi_device_interface_config_t spi_device_cfg = {
    .command_bits=0,
    .mode=0,
    .clock_speed_hz=1000000,
    .spics_io_num=CS_PIN,
    .queue_size=1
};
And I am trying to get data like this:

Code: Select all

uint8_t request[1] = { 0xF8 };

memset(&t, 0, sizeof(t));
t.tx_buffer = &request;
t.length = 3585 * 8;
t.rxlength = 3584 * 8;

ret = spi_device_transmit(spi, &t);
assert( ret == ESP_OK );
I am not sure what I am doing wrong. Any idea?

Thanks

tatulea
Posts: 5
Joined: Wed Feb 06, 2019 12:39 pm

Re: ESP32 spi_device_queue_trans error

Postby tatulea » Fri Feb 08, 2019 10:50 am

It looks like the problem was from DMA. I set it to 0 and I had to put it to 1 in order to use DMA in transaction.

xiaoxufeng
Posts: 8
Joined: Mon Aug 28, 2017 10:25 am

Re: ESP32 spi_device_queue_trans error

Postby xiaoxufeng » Mon Feb 11, 2019 3:39 pm

tatulea wrote:
Fri Feb 08, 2019 10:50 am
It looks like the problem was from DMA. I set it to 0 and I had to put it to 1 in order to use DMA in transaction.
Hi tatulea,
Thanks for your sharing of the debug result.
We will add a check in the code to help you detect this in the future.

Return to “ESP32 IDF”

Who is online

Users browsing this forum: No registered users and 11 guests