-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
[TW#19301] SPI MISO on input only pins (GPIO34-35-36-39) not working #1736
Comments
Yes it looks correct, but miso needs to be output in dual/quad mode or slave mode so it should return an error in those cases. |
It looks like in issue #598 that half duplex is not even functioning, and isn't likely to be fixed any time soon. Given that having half duplex supported is precondition to being able to do quad/dual IO on SPI, it seems rather unfortunate to further reduce the capabilities of the SPI interface. Would be preferable in my humble opinion to error out on spi_bus_add_device() where the spi_device_interface_config_t is specified (and the configuring for normal, dual, or quad IO is provided) rather than on spi_bus_initialize(). |
@mreutman this idea is good, we'll add this. |
@gdefoest we fixed this, please check whether it works. |
I tested it again on be81d2c. |
Hi all,
I am working on a design that uses an external SPI device (SX1278) with the MISO pin assigned to GPIO35. This is an input only pin so it means the MISO (Master Input Slave Output) should work if the ESP32 is the SPI master but it is not the case.
I am getting the following error in the boot sequence:
E (449) gpio: io_num=35 can only be input.
This is my init sequence:
I see this in the driver (spi_common.c, line 271)
The issue comes from the fact we assign an input only pin in an INPUT_OUTPUT.
So I think the piece of code above should be this instead:
What are your thoughts?
The text was updated successfully, but these errors were encountered: