Skip to content

Commit 1a99ce5

Browse files
committed
espressif: busio.SPI: Use SPI_DMA_CH_AUTO
All 3 micros we care about (S2, S3, C3) state in the documentation that DMA channel can be specified as SPI_DMA_CH_AUTO. Specifying a specific DMA channel explicitly doesn't _ever_ work on ESP32-S3, so no SPI bus could be used. Testing performed: On the ESP32-S3-DevKitC, used neopixel_spi to turn the onboard neopixel red, green, and blue
1 parent f594ab2 commit 1a99ce5

File tree

1 file changed

+1
-1
lines changed
  • ports/espressif/common-hal/busio

1 file changed

+1
-1
lines changed

ports/espressif/common-hal/busio/SPI.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self,
9393
mp_raise_ValueError(translate("All SPI peripherals are in use"));
9494
}
9595

96-
esp_err_t result = spi_bus_initialize(self->host_id, &bus_config, self->host_id /* dma channel */);
96+
esp_err_t result = spi_bus_initialize(self->host_id, &bus_config, SPI_DMA_CH_AUTO);
9797
if (result == ESP_ERR_NO_MEM) {
9898
mp_raise_msg(&mp_type_MemoryError, translate("ESP-IDF memory allocation failed"));
9999
} else if (result == ESP_ERR_INVALID_ARG) {

0 commit comments

Comments
 (0)