Hi,
I'm new with ESP32 (I previously used ESP8266) and I wanted to try the multicore architecture of this chip.
So I modified a program that I've written where temperature is acquired through an HDC1080 and shown on an OLED 0.96".
On the display it's also shown the time (hh:mm:ss) read from a NTP server.
Everything work without problems if I compile the program "for a single core" (reading of the temperature and time happens on the "loop" thread).
Then I modified the code by adding a "Task1", moving the reading of the temperature code from "loop" to this task.
Since both HDC1080 and OLED display use the same bus, I created a "semaphore" where if I have to write something on the display the reading from the HDC is blocked (bus is used by the display), so reading of the temperature takes place only when the program doesn't have to show anything.
The temperature is displayed only when there is a variation from the previous reading and read every 3 secs (if the I2C bus is not busy), the time is displayed every 1 sec (there's a "delay(1000)" on the "loop" thread) .
The program works without errors for some minutes then reboots by itself.
What could I check?
Is it something related with I2C being used by both tasks?
Thank you, regards.
Roberto
ESP32 WROOM Devkit 1 reboot with multicore code
-
- Posts: 1
- Joined: Sat Dec 18, 2021 2:47 pm
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Masoud123456 and 55 guests