ESP32 conflict with webserver and RTC

Hi everyone, I have another problem that I need some guidance on.
I am using an ESP32 with a web server. I log data to an SD card and then retrieve it over a web page request. That all works fine until I add an external RTC (needed for battery backup) . I have spent sometime with this problem I can run the webserver or I can run the RTC but I can't run both together so my question is: is it possible there is an internal conflict within the ESP32?
Any guidance greatly appreciated
Thanks

Do you think that it might help to provide an answer if you posted your sketch that does not work as you require ?

There is fundamentally no problem using an RTC with the ESP32 but a schematic of your project showing the sensor(s) that you are using might reveal a problem

Please clarify why the RTC is "needed for battery backup" as it is surely not powering the ESP32

Presumably for backup of running data, though both the SD card and the ESP can be used for storing data during power loss.

The one advantage of the RTC is that it is BBRAM and not flash so there is no limit to how often it can be written.

If you are sure that there should be no conflict I'll persevere and try to resolve my problem myself, (I learn more that way) however if I fail I'll come back thanks.
The reason for wanting a separate RTC is that my ESP32 is prone to power failure, as you know if you reset the ESP then time reverts to power on time and I use time to identify my files.
If I thought I could power my ESP from the RTC then I shouldn't be on this site :slight_smile:
Thanks for now

As I said to UKHeliBob the rtc battery backup is just to maintain time, nothing else. thanks

Please post your code and a schematic of your project. A photo of a pencil and paper drawing is good enough

post your code, an image or 2 of your project all wired up and not working, and a schematic.

Webserver and RTC isn't a problem. I use a DS3231(pin 16 SCL to IO22 pin 15 SDA to IO21) and webserver with websockets and JSON.

Why not synchronise with NTP server at startup?

As I said earlier I would really like to try and solve my problem myself. You have answered my question which was " is it possible there is an internal conflict within the ESP32?" Which as you have said there should not be one. knowing that I can assume the problem is with my coding which I am happy to delve into.
I am sure you guys would probably solve it in a flash and I really appreciate that, however that way I don't learn much. As this is just a hobby and I have the time I am quite content. If I get desperate I know I can call on you all later.
Thanks

That is just what I want to do and it sounds as if I have the same set up.
Please have a look at my reply to UKHeliBob

You have not described exactly what happens when you try your combined sketch beyond that it does not work

Common causes of projects not working when extra elements are added include lack of memory, conflicting use of pins and blocking code preventing free running of both elements of a project

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.