-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPI transactions never finish (IDFGH-4825) #6624
Comments
I performed a test similar to what you had recommended, replacing logs with an event group ESP_ERROR_CHECK( spi_bus_add_device(
VSPI_HOST,
&( const spi_device_interface_config_t ) {
.command_bits = 3,
.address_bits = 5,
.spics_io_num = SLAVE_SELECT_PORT_SET,
.clock_speed_hz = SPI_MASTER_FREQ_20M / 4,
.mode = 1,
.queue_size = 1,
.cs_ena_pretrans = 1,
},
&trf_hdl ) ); Do you have any tips on taking this test a step further in order to isolate the problem? Btw, as indicated on the linked fork of IDF, the test was performed on latest master as of right now (21359bf) |
Environment
Problem Description
I have a custom board with 2 SPI-based peripherals, both of which share the VSPI bus. I'm having an issue in which the SPI stops working intermittently, regardless of the transaction type or peripheral, although apparently at the same stage of the transaction.
Interrupt transactions stop here (waiting for this) and polling transactions here (which leads to here) and sometimes while trying to acquire the bus for the transaction, as shown below. Both are basically the turning point to the end of each SPI transaction, and this similarity invites the belief in a correlation between the issues.
The workload on Core 0, other than IDF defined stuff, is basically the BLE Controller + occasionally non-pinned tasks like LwIP and MQTT, which leads me to believe
spi_intr
isn't being starved. Callingspi_bus_initialize
on the other core didn't help. I use the transaction wrappersspi_device_{polling,}transmit
, which are themselves wrapped by a bus-wide mutex, so I guess that also takes thread-safety issues out of the table.Let me know of any other tests I should perform and details I can provide other than the code, ELF and complete coredump publicly (NDA).
Click to expand: bits of the coredump
Click to expand: sdkconfig
The text was updated successfully, but these errors were encountered: