Description
Basic Info
- [x ] This issue complies with the issue POLICY doc.
- [ x] I have read the documentation at readthedocs and the issue is not addressed there.
- [ ?] I have tested that the issue is present in current master branch (aka latest git).
- [ x] I have searched the issue tracker for a similar issue.
- [ x] If there is a stack dump, I have decoded it.
- [ x] I have filled out all fields below.
Platform
- Hardware: Wemos D1 mini (reports: ESP8266EX) w/ RTC Shield/SD
- Core Version: [latest git hash or date]
- Development Env: 1.8.16
- Operating System: Win 10
Settings in IDE
- Module: Wemos D1 mini ESP8266 3.0.2 (from 2.5.2)
- Flash Mode: qio
- Flash Size: 4MB
- lwip Variant: v2 lower mem
- Reset Method: nodemcu, hard, power
- Flash Frequency: ?? Mhz
- CPU Frequency: Crystal is 26MHz
- Upload Using: SERIAL
- Upload Speed: 460800 (auto set)
Problem Description
Working code (plus 10 past versions) stopped working immediately after updating from Boards esp8266 by ESP8266 Community version 2.5.2 to 3.0.2.
Code still complies w/o error. (Takes take 3x longer.)
I have tried all the Wemos LOLIN boards on the 3.0.2, include generic esp8266. Similar chksum errors from all.
Output before:
========= 20220201,Tue,07:54:28
Device Altitude(abs): 6.00 meters AMSL
Temperature: 28.47C; 83.25F Falling
Barometric Pressure(abs): Rising-Fair Weather
955.597 hPa(mbar); 95559.720 Pa
950.916 hPa, Short Term Past Average
716.757 mmHg
0.943101 Atm
Barometric Pressure-Comp'ed To Sealevel
956.247 hPa(mbar); 95624.692 Pa
717.244 mmHg
0.943742 Atm
Output after:
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
wdt reset
load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v00055920
~ld
MCVE Sketch
One sample of previously working code here (compile info below):
https://github.com/TSBrownie/Arduino-Wemos-D1-Weather-Basic/tree/main/2022WeatherBMP280-04x
#include <Arduino.h>
void setup() {}
void loop() {}
Debug Messages
Executable segment sizes:
ICACHE : 32768 - flash instruction cache
IROM : 247428 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 27369 / 32768 - code in IRAM (IRAM_ATTR, ISRs...)
DATA : 1520 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 1152 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 26216 ) - zeroed variables (global, static) in RAM/HEAP
Sketch uses 277469 bytes (26%) of program storage space. Maximum is 1044464 bytes.
Global variables use 28888 bytes (35%) of dynamic memory, leaving 53032 bytes for local variables. Maximum is 81920 bytes.
esptool.py v3.0
Serial port COM4
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: e8:db:84:dc:c5:06
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 281616 bytes to 205845...
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 281616 bytes (205845 compressed) at 0x00000000 in 4.6 seconds (effective 488.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
NOTE: Simple code such as the following still compiles / works, but only after initially reporting checksums:
//Arduino C. Wemos D1R1 ESP8266Boards (2.5.2) Mini DS32 w/ Mini Shield.
//Read Real Time Clock Module DS1307. COM7. VCC->5v, Gnd->Gnd, SDA (data)->A4, SCL (clk)->A5
//RTC Pinouts, I2C. D1 = SCL, D2 = SDA
//20210323 - by TSBrownie. Non-commercial use approved.
#include "Wire.h" //Include I2C library
#define DS1307 0x68 //Default I2C Addr of 1307 0x68 Hex
String DoWList[] = {"Null"," Sun "," Mon "," Tue "," Wed "," Thr "," Fri "," Sat "}; //DOW from 1-7
byte second, minute, hour, DoW, Date, month, year; //Btye variables for BCD time
int sec, mm, hh, dow, date, mnth, yy; //Decimal variables
byte BCD2DEC(byte val){ //Ex: 51 = 01010001 BCD. 01010001/16-->0101=5 then x10-->50.
return(((val/16)*10)+(val%16));} // 01010001%16-->0001. 50+0001 = 51 DEC
void GetRTCTime(byte *second, byte *minute,byte *hour,byte *DoW,
byte *Date,byte *month,byte *year){
Wire.beginTransmission(DS1307); //Open I2C to RTC
Wire.write(0x00); //Write reg pointer to 0x00 Hex
Wire.endTransmission(); //End xmit to I2C. Send requested data.
Wire.requestFrom(DS1307, 7); //Get 7 bytes from RTC buffer
*second = BCD2DEC(Wire.read() & 0x7f); //Set pntr to seconds remove hi order bit
*minute = BCD2DEC(Wire.read()); //Set pointer to minutes
*hour = BCD2DEC(Wire.read() & 0x3f); //Set pntr to hour remove 2 hi order bits
*DoW = BCD2DEC(Wire.read()); //Set pointer to day of week
*Date = BCD2DEC(Wire.read()); //Set pointer to Date
*month = BCD2DEC(Wire.read()); //Set pointer to month
*year = BCD2DEC(Wire.read()); //Set pointer to year
}
void printTime(){ //Read & print data from RTC
GetRTCTime(&second, &minute, &hour, &DoW, &Date, &month, &year); //Get RTC data
Serial.print(2000+year, DEC); //Print year 20xx
Serial.print("/");
if (month<10){Serial.print("0");} //Print leading 0 if needed
Serial.print(month, DEC); //Month as decimal
Serial.print("/");
if(Date<10){Serial.print("0");} //Print leading 0 if needed
Serial.print(Date, DEC); //Date (1-30)
Serial.print(DoWList[DoW]); //1Sun-7Sat (0=null)
if (hour<10){Serial.print("0");} //Print leading 0 if needed
Serial.print(hour, DEC); //HH
Serial.print(":");
if (minute<10){Serial.print("0");} //Print leading 0 if needed
Serial.print(minute, DEC); //MM
Serial.print(":");
if (second<10){Serial.print("0");} //Print leading 0 if needed
Serial.println(second, DEC); //SS
}
void setup(){ //Setup function
Wire.begin(); //Join I2C bus as primary
Serial.begin(74880); //Initialize serial com
for(int i=1; i<5; i++){ //Read RTC and print date/time for user verify
printTime(); //Output date/time to Serial Monitor
delay(1000); //Delay output x seconds
}
Serial.println("If the above date and times are correct, the RTC is updated.");
}
void loop(){} //Just loops
OUTPUT:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3460, room 16
tail 4
chksum 0xcc
load 0x3fff20b8, len 40, room 4
tail 4
chksum 0xc9
csum 0xc9
v00042ec0
~ld
2022/02/02 Wed 15:36:42
2022/02/02 Wed 15:36:43
2022/02/02 Wed 15:36:44
2022/02/02 Wed 15:36:45
If the above date and times are correct, the RTC is updated.