Hi Sara
On further review regarding this topic, the RTC code as written in the RNT RTC guide does not need modification and it works fine.
The problem that I had and which was solved pertains only to the case where the esp32 goes to sleep. My code incorporates the RTC code and in this case the modification should be made in the void setup() – and not in the void setDS3231time(…..) – for :
Wire.write(0x0E); // select register
Wire.write(0b00011100); // write register bitmap, bit 7 is /EOSC
I don’t see anywhere in the esp32 book where both deep sleep and an RTC are used together, so perhaps something to add for ver. 3?