Closed JBSchueler closed 2 years ago
Yes I had the same issues,
You can fix the first one by adding:
if it does not work you can replace '3' (which is automatic channel selection) by '1' or '2' in ESP32DMASPISlave.h
You can fix the second one by explicitely initialize bus_cfg, for instance: spi_bus_config_t bus_cfg { .mosi_io_num = 13, // HSPI .miso_io_num = 12, // HSPI .sclk_io_num = 14, // HSPI .quadwp_io_num = -1, .quadhd_io_num = -1, .max_transfer_sz = 4092, // default: 4092 if DMA enabled, SOC_SPI_MAXIMUM_BUFFER_SIZE if DMA disabled .flags = SPICOMMON_BUSFLAG_SLAVE, .intr_flags = ESP_INTR_FLAG_IRAM };
you can see that compared to the original file, I added the missing fields .quadwp_io_num, .quadhd_io_num (both can be set to -1 without any effect) and .intr_flags (you can also set it to 0)
@Fasol0 , thanks.
I noticed SPI_DMA_CH_AUTO
should have the value 3 by looking at the code
https://github.com/hideakitai/ESP32DMASPI/blob/9a77471f992a5573aaff1e2fb566df819637cb88/ESP32DMASPISlave.h#L184
It accepts 3 as well so that must be SPI_DMA_CH_AUTO
Nevertheless, it should be solved. Personally I don't push code which is does not compile.
@JBSchueler @Fasol0 Hi, v0.2.0 requires ESP32 version >= 2.0.0 for Arduino IDE, and not supported on PlatformIO now. Added supported version matrix to README
@hideakitai Thanks for the information, I was not aware of that.
I get a compile error