Page 1 of 1

SPI slave mode, CLK cannot be on input only pin (see GitHub issue #2455)

Posted: Wed Feb 27, 2019 1:12 pm
by trancefreak
Hi,

There was an issue that in SPI slave mode the CLK pin couldn't be on an input only pin.
See: https://github.com/espressif/esp-idf/issues/2455

This already has been fixed in the ESP-IDF master branch but it looks like the Arduino Core still doesn't have the fix (the pre-compiled libraries).

When using the newest Arduino Core (just made a pull) this error still appears and the ESP resets itself in a loop:
E (3019) spi: spicommon_bus_initialize_io(156): sclk not valid

Can anyone from Espressif give me an update when the fix will be available on the Arduino Core side?

Kind Regards,
Christian

Re: SPI slave mode, CLK cannot be on input only pin (see GitHub issue #2455)

Posted: Thu Feb 28, 2019 3:22 pm
by trancefreak
No one from Espressif has an idea when the fix will be available in the arduino core framework?
Is it possible to build the libraries used by arduino core by myself out of the ESP-IDF framework?
I think the libdriver library is affected.

Re: SPI slave mode, CLK cannot be on input only pin (see GitHub issue #2455)

Posted: Fri Mar 01, 2019 10:00 am
by ESP_Me-no-dev
I'll try to update the IDF libs over the weekend. That should fix the issue :)

Re: SPI slave mode, CLK cannot be on input only pin (see GitHub issue #2455)

Posted: Fri Mar 01, 2019 12:14 pm
by trancefreak
Thanks very much!
In the meantime I use the following workaround (don't know if this is really the correct way):
I downloaded the spi_common.c code from the IDF gibthub gepo and added this file to my sources. Looks like the linker then uses this code instead of the one in the library.