-->
Page 1 of 4

spi esp8266

PostPosted: Tue Aug 15, 2017 2:33 pm
by stern0m1
whats the proper way to connect esp8266 to an SPI device in regards to CS? The esp docs says to use gpio 15 for CS but the docs also say gpio 15 should be pulled low.
So, is that a problem if cs is pulled low?

Thanks

Re: spi esp8266

PostPosted: Tue Aug 15, 2017 3:44 pm
by RFZ
When you enable the hardware CS support for SPI, GPIO15 will be actively driven HIGH when no data is transferred, and actively driven LOW when data is transferred. A pull-down is no problem in this case, besides the fact that it will draw a continuous current all the time, so you should choose a fairly high pulldown.

Re: spi esp8266

PostPosted: Tue Aug 15, 2017 3:57 pm
by stern0m1
What value resistor should i use?
Thanks

Re: spi esp8266

PostPosted: Tue Aug 15, 2017 4:11 pm
by RFZ
Do you care about the current draw? is your device battery powered? I'd suggest at least 10k, maybe 50k.
Please also make sure that your SPI slave device does not have a pull-up resistor on CS.
If it has one, the pull-up in the slave device and your pull-down would form a voltage divider on GPIO15 during boot (when GPIO15 is high impedance input). If you can, remove it. If you cannot, you're screwed, because then your pull-down must be way lower than the pull-up so the voltage is still close to GND on GPIO15 when it is an input...