Always getting some ugly characters after some time in serial monitor

Hi,

At the moment I can't use my esp32 anymore because after some time the serial monitor keeps showing ugly characters. I tested it now with a simple code (attached) and there too I get the same problem (also attached).
Sometimes it only takes a minute and sometimes the characters appear after 30 minutes.
Then the serial monitor also hangs up and must be closed via the task manager.
I am using Arduino 1.8.19.
Can someone help me and tell me what to do?
Thanks in advance!

Mads

Code

Insert a delay(100) simply

Thank you for your reply. I'm testing adding "delay(100)". Can you explain to me what these signs mean please?

Why do you define a SERIALPORT that you never use?

Sorry, forgot to take that line out.

inserted the delay(100). Unfortunately still same issue (new output attached)

Have you tried with a different computer (PC)?

No, I have just used the same Windows laptop since the very beginning.

Then you might be beating yourself on the head with it until you try a different one. Is there any external hardware or devices connected to the ESP32, or is it just the bare board? Circuit problems can cause this.

does this make bad characters print?


void setup()
{
  Serial.begin(9600);
  xTaskCreatePinnedToCore( fTaskPrint, "fTaskPrint", 10000, NULL, 2, NULL, 1 );
}
////
void fTaskPrint( void * pvParameters)
{
  for (;;)
  {
    Serial.println("Hello");
    vTaskDelay(1);
  }
}
//

void loop() {}

Thanks @Idahowalker and @anon57585045
I tried code from @Idahowalker with the same PC and failed.
I also failed with another Mac.

1st image: Serial monitor hangs while "Hello" is displayed, before that the time already started to hang, as can be seen on timestamps
2nd image: bad characters on PC, before that the time already started to hang, as can be seen on timestamps
3rd picture: bad characters on Mac, before that the time already started to hang, as can be seen on timestamps



post a schematic.

post an image of your project all wired up.

1 Like

Take all the hardware off your board and run your simple sketch again- if that works ok , then the problem is caused by the added circuitry . Add parts one at a time to identify the cause .
Don’t power loads of parts off the Arduino 5v line ( which over heat it and cause problems ) . .

Thank you. The problem is that everything worked fine for about 2 months. Then came the ugly characters. And now even with no external components, just running the ESP on the board with simple "hello" code gives the ugly characters too.

Does the spare ESP32 do the same thing?

Can you try a different board and/ or different computer to find the issue ?
( again with a bare board ) .
Can you run say examples /blink ok ?

By changing things around like this you will identify where the cause lies .

Placed new esp on the pcb and the same error occurs from the start.

Unfortunately I just have one board. Tried with a Mac and had same problem.

Don’t put it on the PCB !! Run it bare - in case the PCB is the cause .

I will try examples