Mysterious delay on ESP32s - Stack Overflow

I have troubles with a mysterious delay on ESP32s. It makes my project work incorrectly.For example, t

I have troubles with a mysterious delay on ESP32s. It makes my project work incorrectly.

For example, to exclude another reason, I show it on empty project.

This is the code:

loop() {
  Serial.print("moment1: ");
  Serial.println(micros() - processTime);
  processTime = micros();

  Serial.print("moment2: ");
  Serial.println(micros() - processTime);
  processTime = micros(); 

  Serial.print("last moment:");
  Serial.println(micros() - processTime);
  processTime = micros();
  Serial.println();
}

In the output, I see anything like:

moment1: 42
moment2: 19
last moment: 10233

moment1: 43
moment2: 19
last moment:  21

moment1: 42
moment2: 10197
last moment: 20

Does anybody know where from this delay for > 10000 micro seconds comes from? And how to get rid of it?

This delay distorts the work of the project. And in this project wifi or BT are not used

I was trying to use

noInterrupts(); 
//code; 
interrupts();

but esp going to reboot

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743963285a4537075.html

相关推荐

  • Mysterious delay on ESP32s - Stack Overflow

    I have troubles with a mysterious delay on ESP32s. It makes my project work incorrectly.For example, t

    3天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信