In common.h the I2C SS is specified as:
static const uint8_t SS = 15;
But for a normal boot, gpio15 must be pulled low.
When I attach an I2C device to MOSI, MISO, SCK and SS, how can I be certain the esp will still boot? (in my case it fails 'randomly')
Would a pulldown resistor on gpio15 be enough to fix this correctly? Or should I remove the device' SS at each boot?
can not use a pulled down pin (GPIO15) for I2C ;) I2C can work only with pull-ups.
MOSI, MISO, SCK and SS are SPI pins and if you use SS for slave select, you need to make sure that the salve is not pulling it up by pull-up.
BUMMER, Ment SPI, not I2C!
So what you are saying is that I cannot pull-down and SPI works with pull-up, but it should not be pulled-up for normal boot operation.... Now I am confused. :(
@me-no-dev the datasheet of my slave device says:
CC1101 is configured via a simple 4-wire SPI compatible interface (SI, SO, SCLK and CSn) where CC1101 is the slave.
...
The CSn pin must be kept low during transfers on the SPI bus.
So in my code I can say
pinMode(SS, OUTPUT);
digitalWrite(SS, LOW); // only set to HIGH when needed
But then still, if you are saying I need pull-up to make SPI work, how can I avoid a wrong boot-mode?
Both the esp and the slave are 'undefined' high or low if not pulled-up/down?
The CC1101 is an SPI-bus device - it does not use the I2C-bus...
On 31 August 2016 at 15:52, supersjimmie [email protected] wrote:
@me-no-dev https://github.com/me-no-dev the datasheet of my slave
device says:
CC1101 is configured via a simple 4-wire SPI compatible interface (SI, SO,
SCLK and CSn) where CC1101 is the slave.
...
The CSn pin must be kept low during transfers on the SPI bus.So in my code I can say
pinMode(SS, OUTPUT);
digitalWrite(SS, LOW); // only set to HIGH when neededBut then still, if you are saying I need pull-up to make I2C work, how can
I avoid a wrong boot-mode?
Both the esp and the slave are 'undefined' high or low if not
pulled-up/down?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/esp8266/Arduino/issues/2466#issuecomment-243770782,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALP8xVarR2SAiAFB0SJ6YpzBSJKNN3Ifks5qlYcsgaJpZM4JxnJc
.
@duncan-a / @me-no-dev I know, I changed my question because I meant SPI instead of I2C.
having a pull-down on pin15 does not break SPI communication. You can in your code init the pin HIGH because that will happen after boot anyway.
Thanks @me-no-dev if that is possible then that is how I will start building.
Hi, sorry for the bump,
but i am facing the same issue here:
i am plugging a wiz5500 to esp8266 via SPI,
and the ESP8266 fails to boot as soon as i plug the SS pin..
How do you handle that ? Should i wire a resistor from gpio15 to GND ?
SPI will still be working after that ?
Thanks !
Hi,
In my case, a pull down was not the solution because the master actively drove the SS up.
My solution was to use another pin as an "SS enable" (SS_EN), with 3 resistors and a transistor. On boot-up, SS_EN is in high impedance and guarantees that GPIO15 is kept down, but as soon as the setup() drives SS_EN high, the master SS signal is passed on to GPIO15.
The schematic is as follows:

Probably a simpler circuit to do the job, but that's what I came up with and it works... feel free to comment or propose alternatives of course...
Hi !
i end up wiring a 4.7k resistor between GPIO15 (D8) and GND.
The GPIO15 is used as SS without any trouble, and it boot correctly now.
Thanks for your help and detailed answer ! It pointed me in the good direction :)
Best,
Thomas
Most helpful comment
Hi !
i end up wiring a 4.7k resistor between GPIO15 (D8) and GND.
The GPIO15 is used as SS without any trouble, and it boot correctly now.
Thanks for your help and detailed answer ! It pointed me in the good direction :)
Best,
Thomas