Been going in circles on this one all day but have now identified that the same “sprintf” time stamp I use on an ESP8266 resets the ESP32 as soon as it’s called. Tried two different boards same result. Even simplified the sketch and used the sketch builder but its always the same use “sprintf” and it resets the ESP32 take it out and it runs fine?
I should point out its the full date and time string with some special characters. Just don’t understand why it would work fine on one device and not the other. It’s something about the threading as it point to processor 1 in the error.
char time_buf[24]; // size big enough for string
sprintf(time_buf,"%02u/%02u/%02u \xe2\x81\x91 %02u:%02u:%02u",day(),month(),year(),hour(),minute(),second());
If anyone has any ideas as to how to solve that would be great
@Juraj You’ve nailed it with nothing i n between the date and time it doesn’t crash.
Weirdly though if I put some standard ASCII like “||” to seperate it will crash once then work fine
It’s a mystery but thanks for your sharp eye on this.
@PeteKnight and @Juraj Just in case you are interested I have just done an experiment with the same ESP32 and using sprintf with unicode separators with an NTP Time sketch.
While it’s well above my pay-grade this result suggests one of the Blynk libraries is the problem as the NTP sketch runs fine as does the Blynk ESP8266 version.
Seems I need to retarct this statement, I’ve managed to crash the ESP32 with complex sprintf statement (one int 2 x strings) in a non-Blynk sketch. Simplified things to “Serial.printf” and it all worked. So it seems its a bug/limitation in the ESP32 firmware.