-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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#26803] spicommon_bus_initialize_io() does not accept SCLK on input pins when slave #2455
Comments
The fix is to do the same for SCLK as was done for MISO in this issue: #1736 |
@bu5hm4nn thanks, we will fix this |
When will this issue be fixed? I'm currently working on a schematic design where I have to know if CLK in slave mode can be assigned to an input only pin. |
Hi @trancefreak77 . It is now under internal review. And may appear on master soon. |
Thanks for the update. |
igrr
pushed a commit
that referenced
this issue
Apr 2, 2019
The requirements of pin capabilites is different for spi master and slave. The master needs CS, SCLK, MOSI to be output-able, while slave needs MISO to be output-able. Previous code is for master only. This commit allows to place other 3 pins than MISO on input-only pins for slaves. Refactoring for spi_common is also included. Resolves #2455
igrr
pushed a commit
that referenced
this issue
Apr 4, 2019
The requirements of pin capabilites is different for spi master and slave. The master needs CS, SCLK, MOSI to be output-able, while slave needs MISO to be output-able. Previous code is for master only. This commit allows to place other 3 pins than MISO on input-only pins for slaves. Refactoring for spi_common is also included. Resolves #2455
catalinio
pushed a commit
to catalinio/pycom-esp-idf
that referenced
this issue
Jun 28, 2019
The requirements of pin capabilites is different for spi master and slave. The master needs CS, SCLK, MOSI to be output-able, while slave needs MISO to be output-able. Previous code is for master only. This commit allows to place other 3 pins than MISO on input-only pins for slaves. Refactoring for spi_common is also included. Resolves espressif/esp-idf#2455
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Problem Description
When using SPI as slave, the function
spicommon_bus_initialize_io
does not allowSCLK to be on an input-only pin.
Expected Behavior
When the devices is configured as SPI Slave, then SCLK is an input-only signal and should be allowed on input-only pins.
Actual Behavior
Assert is thrown:
Steps to repropduce
Try to initialize the SPI as slave with SCK on an input-only pin with the code. No wiring needed.
Code to reproduce this issue
Debug Logs
Proposed solution:
Check the SCLK pin in the same way as the MOSI pin:
and further down replace with this:
The text was updated successfully, but these errors were encountered: