-
Notifications
You must be signed in to change notification settings - Fork 1.3k
ESP8266: Fix pin locking during busio.SPI.configure #938
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
Conversation
…t and configure
I meant to note that I did not test one-way SPI (MOSI only, MISO only). I don't have a test case for that, so feel free to wait for someone who does/can. I could hook up the Saleae, but not sure that is a valid test... |
I think a sufficient test for MISO is to jumper the MISO pin high and see if you read 1's and then hold it low and see if you read 0's. For MOSI you could use the Saleae and just send data, or even just send it to an LED: all 1's and all 0's. It's equally important just to test that supplying |
One last note that I missed... Queue Where is my mind? I removed the passing of |
That is what I ran for both to check construction and pin lockout. I can run those with the Saleae. Just wasn't sure if that would pass muster for a real-world test. |
I think those tests are fine. I tested bidirectional SIPI just by jumpering MOSI to MISO. |
I mean I think testing with the Saleae woudl be fine for actually see that levels show up. |
MOSI Only:
I couldn't get MISO only to register anything. I tried using a gpio just set as high/low, as well as another board connected as a SPI Master. Reading SPI tea-leaves is not my forté. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks very much! Tested MISO-only with a jumper to 3.3V and ground, got expected data.
Hi Guys, |
it looks like i found solution: first i've initiated SPI and after that i've set GPIO mode to OUPUT. Now i can control this pin as normal and TFT works as normal as well:) |
It doesn't work if you set GPIO12 as input. Any solution to that? |
Fixes Issue #642.
hspi.c->spi_init_gpio()
is now bypassed for bothconstruct
andconfigure
.Tested pin locking for MOSI & MISO. Passes. Tested that SPI still works with a TFT display. Passes.