You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If sending a long SPI sequence before initializing Wi-Fi, Wi-Fi won't connect anymore. Example bellow fails at 29 times sending data over SPI, but works up to 28 times.
If starting Wi-Fi first, the problem seems to disappear.
Settings in IDE
Module: WeMos D1 R2 & mini
Flash Size: 4MB
CPU Frequency: 80Mhz
Upload Using: SERIAL
Reset Method: nodemcu
Sketch
#include<SPI.h>
#include<ESP8266WiFi.h>char ssid[] = "myssid";
char pass[] = "mypassword";
voidsetup() {
Serial.begin(115200);
Serial.print("setup: Connecting to ");
Serial.println(ssid);
startupLogo(); // this makes the SPI calls
WiFi.begin(ssid, pass);
Serial.print("setup: ");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println();
Serial.println("setup: WiFi connected");
}
voidloop() {
SPIwrite(D0,0x53122);
Serial.print("Loop!");
delay(500);
}
voidSPIwrite(byte nCS, unsignedlong theString) {
Serial.printf("SPIwrite: SPI value = 0x%08x ",theString);
Serial.println(theString,BIN);
SPI.begin();
SPI.beginTransaction(SPISettings(15000000, MSBFIRST, SPI_MODE0));
digitalWrite(nCS, LOW); // device select
SPI.transfer(theString); // 8 bits outdigitalWrite(nCS, HIGH); // data transfer to SPI outputs...
SPI.endTransaction();
SPI.end();
}
voidstartupLogo(){
int i=0;
while (i<29) {
SPIwrite(D3, 0x22122);
i++;
delay(100);
}
}
The text was updated successfully, but these errors were encountered:
Basic Infos
Hardware
Hardware: Wemos D1 mini Pro
Core Version: 2.3.0
Description
If sending a long SPI sequence before initializing Wi-Fi, Wi-Fi won't connect anymore. Example bellow fails at 29 times sending data over SPI, but works up to 28 times.
If starting Wi-Fi first, the problem seems to disappear.
Settings in IDE
Module: WeMos D1 R2 & mini
Flash Size: 4MB
CPU Frequency: 80Mhz
Upload Using: SERIAL
Reset Method: nodemcu
Sketch
The text was updated successfully, but these errors were encountered: