ESP-WROOM-32 ESP32 ESP-32S (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) flash read err, 1000

Hi Everyone, I am building a weather station and I am having a problem using the serial monitor with the BMP280 temp/barometer and my ESP32. Seems the serial monitor will not work properly. I did some googling and I haven't been able to find anything worth while on this issue. I am getting the following error when I open the serial monitor:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
lash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

I am using this ESP32 module - ESP-WROOM-32 ESP32 ESP-32S

The code being executed is from the examples for the BMP280 (see below)

#include <Wire.h>
#include <SPI.h>
#include <Adafruit_BMP280.h>

Adafruit_BMP280 bmp; // use I2C interface
Adafruit_Sensor *bmp_temp = bmp.getTemperatureSensor();
Adafruit_Sensor *bmp_pressure = bmp.getPressureSensor();

void setup() {
  Serial.begin(115200);
  while ( !Serial ) delay(100);   // wait for native usb
  Serial.println(F("BMP280 Sensor event test"));

  unsigned status;
  //status = bmp.begin(BMP280_ADDRESS_ALT, BMP280_CHIPID);
  status = bmp.begin(0x76);
  if (!status) {
    Serial.println(F("Could not find a valid BMP280 sensor, check wiring or "
                      "try a different address!"));
    Serial.print("SensorID was: 0x"); Serial.println(bmp.sensorID(),16);
    Serial.print("        ID of 0xFF probably means a bad address, a BMP 180 or BMP 085\n");
    Serial.print("   ID of 0x56-0x58 represents a BMP 280,\n");
    Serial.print("        ID of 0x60 represents a BME 280.\n");
    Serial.print("        ID of 0x61 represents a BME 680.\n");
    while (1) delay(10);
  }

  /* Default settings from datasheet. */
  bmp.setSampling(Adafruit_BMP280::MODE_NORMAL,     /* Operating Mode. */
                  Adafruit_BMP280::SAMPLING_X2,     /* Temp. oversampling */
                  Adafruit_BMP280::SAMPLING_X16,    /* Pressure oversampling */
                  Adafruit_BMP280::FILTER_X16,      /* Filtering. */
                  Adafruit_BMP280::STANDBY_MS_500); /* Standby time. */

  bmp_temp->printSensorDetails();
}

void loop() {
  sensors_event_t temp_event, pressure_event;
  bmp_temp->getEvent(&temp_event);
  bmp_pressure->getEvent(&pressure_event);
  
  Serial.print(F("Temperature = "));
  Serial.print(temp_event.temperature);
  Serial.println(" *C");

  Serial.print(F("Pressure = "));
  Serial.print(pressure_event.pressure);
  Serial.println(" hPa");

  Serial.println();
  delay(2000);
}

Thank you in advance for your assistance.
Chris

@cwojohoitz
You posted in the forum that said it was not for your project. I have moved it here to a better place.

Oh really? Thats strange. Ok thank you Mike. I appreciate it.

Chris

Yes you posted in installation and troubleshooting, it says in the forum description not for your project.

That section is all about installation and troubleshooting of the IDE, not your project.

Personally I think that section is badly named. About 10 to 20 posts a day fall foul of posting about their project in that section, but still the forum software guardian refuse to change it.

1 Like

When you ran the I2C scanner what were the scanner results?

I'm sorry, I don't know what you mean by I2C scanner. In my search for info on the web I recall seeing someone else mention the I2C scanner but I guess I don't understand the significance of it. I just started working with the ESP32. First project. I'll look in to the I2C scanner.

https://forum.arduino.cc/search?q=i2c%20scanner

1 Like

In the meantime i just found a video on serial communications and the ESP32. Seems there are a few different ways the ESP can communicate and this can be set programatically. This video is by Andreas Spiess. I like that guy... Anyways, I digress..

In the video he tries to demonstrate writing a message to serial by all serial paths. Interestingly enough, one of the paths he is getting the exact same error message as I am getting.. Hmmm.....

I will do some research on I2C scanners and what they do. I am connecting this thru I2C of course.

Thanks,
Chris

Hi Idahowalker,

I found an I2C scanner, the code is below

// ---------------------------------------------------------------- /
// Arduino I2C Scanner
// Re-writed by Arbi Abdul Jabbaar
// Using Arduino IDE 1.8.7
// Using GY-87 module for the target
// Tested on 10 September 2019
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
// ---------------------------------------------------------------- /

#include <Wire.h> //include Wire.h library

void setup()
{
  Wire.begin(); // Wire communication begin
  Serial.begin(115200); // The baudrate of Serial monitor is set in 9600/ 115200 for ESP32
  while (!Serial); // Waiting for Serial Monitor
  Serial.println("\nI2C Scanner");
}

void loop()
{
  byte error, address; //variable for error and I2C address
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for (address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address < 16)
        Serial.print("0");
      Serial.print(address, HEX);
      Serial.println("  !");
      nDevices++;
    }
    else if (error == 4)
    {
      Serial.print("Unknown error at address 0x");
      if (address < 16)
        Serial.print("0");
      Serial.println(address, HEX);
    }
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(5000); // wait 5 seconds for the next I2C scan
}

But when I loaded it on my ESP32S and opened up my Serial Output I see the same message as before... ????

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 
ets Jun  8 2016 00:22:57

Any thoughts on how I can get this sorted?
Thanks,
Chris

Also, I tried to compile the sketch from Andries Spiess (video #152) to see if the serial port was somehow different but I cannot get this sketch to compile on my board of course... The code is below:

/*
 This sketch is to determine which serial communication is working on the ESP32 chip
 */

 HardwareSerial Serial1(1);
 HardwareSerial Serial2(2);

 void setup()
{
  Serial.begin(115200);
  Serial1.begin(115200);
  Serial2.begin(115200);
}

void loop() 
{
  Serial.println("This message is sent from USB Serial");
  Serial1.println("This message is sent from USB Serial1");
  Serial2.println("This message is sent from USB Serail2");
  delay(2000);
}

Any help would be greatly appreciated.
Thanks,
Chris

Can you disconnect all the external components and upload a blank sketch?

Yes, I can upload other sketches and the serial works as well. I just uploaded and tested the sample sketch to get the MAC Address of the ESP32 and it worked fine. I was able to read the Serial data with no issue.

What happens when you

/*
 This sketch is to determine which serial communication is working on the ESP32 chip
 */

 //HardwareSerial Serial1(1);
 //HardwareSerial Serial2(2);

 void setup()
{
  Serial.begin(115200);
  //Serial1.begin(115200);
  //Serial2.begin(115200);
}

void loop() 
{
  Serial.println("This message is sent from USB Serial");
  //Serial1.println("This message is sent from USB Serial1");
  //Serial2.println("This message is sent from USB Serail2");
  delay(2000);
}

?

What happens when you

/*
 This sketch is to determine which serial communication is working on the ESP32 chip
 */

 HardwareSerial Serial1(1);
 //HardwareSerial Serial2(2);

 void setup()
{
  Serial.begin(115200);
  Serial1.begin(115200);
  //Serial2.begin(115200);
}

void loop() 
{
  Serial.println("This message is sent from USB Serial");
  Serial1.println("This message is sent from USB Serial1");
  //Serial2.println("This message is sent from USB Serail2");
  delay(2000);
}

?

Yeah, I tried that as well. Worked fine. This is a weird error for sure

So it is Serial2 that is the issue?

What happens when you try

HardwareSerial aSerialThingy ( 2 );
// pin 26=RX, pin 25=TX

void setup()
{
  aSerialThingy.begin ( SerialDataBits, SERIAL_8N1, 26, 25 );

}

void loop()
{
aSerialThingy.println("This message is sent from USB Serail2");
}

?

I don't think so. This sketch was to check from where the serial is communicating. I thought this might possibly be the reason why the sketch with the BMP280 was not working so I tried it. Seems like the Serial is fine because all other sketches I've tried worked fine. Weird... I don't understand why the BMP280 is having a problem. I ran the sketch with the BMP280 removed from the breadboard and the serial worked, giving me the message "BMP280 not found. Check wiring".

post an image of the bmp wired up and not working.

is your BMP a 3.3V or a 5V model?

it is the 3.3v model. Thanks for your help btw. I really appreciate it. I will send a picture of it wired up after I feed the boss lady :wink:

1 Like

Well I discovered what is up with my ESP32. I ordered a few of them at different times, thus have 2 different boards. I realized the pins on the first 32 have like 40 pins on it and the 2nd one has 30 (which matches the pinout I have for the ESP32) I didn't notice the pin count did not match the first one. So now I am working thru figuring out my issue connecting to my router but I'm pretty sure I got the issue with the serial monitor sorted. Once I get this thing on my network and displaying values from the BMP280 I will let ya know.

Thanks for your help. I appreciate it. Now to find the pinout for that specific ESP with 40pins....

This crazy ESP32 man.. Geez.