简体   繁体   English

我在使用esp32在arduino中执行简单任务时遇到此看门狗定时器错误

[英]I am getting this watchdog Timer error while doing a simple task in arduino with esp32

i have seen a lot of forums where this problem is dicussed but nothing seems to work. 我已经看到很多论坛都讨论过这个问题,但似乎没什么用。 I am working with esp32 and it was all fine untill out of nowhere this watch dog timer error came up. 我正在使用esp32,它一切都很好,直到这个看门狗定时器错误出现。 I am new to it so i cant really fix this. 我是新手,所以我无法解决这个问题。 I have another code but i copied a very simple chunk of it and created a new file but watch dog timer error is appearing here too. 我有另一个代码,但我复制了一个非常简单的块,并创建了一个新文件,但看门狗计时器错误也出现在这里。 I dont know what the issue. 我不知道是什么问题。 it said idle0 is not resetting watach dog timer and "wifi" task is running on cpu0. 它说idle0没有重置watach dog计时器,并且“wifi”任务正在cpu0上运行。

ERROR LOG E (42418) task_wdt: Task watchdog got triggered. 错误日志 E(42418)task_wdt:任务看门狗得到触发。 The following tasks did not reset the watchdog in time: E (42418) task_wdt: - IDLE0 (CPU 0) E (42418) task_wdt: Tasks currently running: E (42418) task_wdt: CPU 0: wifi E (42418) task_wdt: CPU 1: IDLE1 E (42418) task_wdt: Aborting. 以下任务未及时重置监视程序:E(42418)task_wdt: - IDLE0(CPU 0)E(42418)task_wdt:当前正在运行的任务:E(42418)task_wdt:CPU 0:wifi E(42418)task_wdt:CPU 1:IDLE1 E(42418)task_wdt:正在中止。 abort() was called at PC 0x400d96f7 on core 0 abort()在核心0上的PC 0x400d96f7处调用

Backtrace: 0x4008c470:0x3ffbe270 0x4008c6a1:0x3ffbe290 0x400d96f7:0x3ffbe2b0 0x400815dd:0x3ffbe2d0 0x40136087:0x00000000 Backtrace:0x4008c470:0x3ffbe270 0x4008c6a1:0x3ffbe290 0x400d96f7:0x3ffbe2b0 0x400815dd:0x3ffbe2d0 0x40136087:0x00000000

Rebooting... ets Jun 8 2016 00:22:57 重新启动... ets 2016年6月8日00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0018,len:4 load:0x3fff001c,len:1100 load:0x40078000,len:10088 load:0x40080400,len:6380 entry 0x400806a4 RST:位于0xC(SW_CPU_RESET),引导:0×17(SPI_FAST_FLASH_BOOT)configsip:0,SPIWP:0xee clk_drv:0x00时,q_drv:0x00时,d_drv:0x00时,cs0_drv:0x00时,hd_drv:0x00时,wp_drv:0×00模式:DIO,时钟DIV: 1 load:0x3fff0018,len:4 load:0x3fff001c,len:1100 load:0x40078000,len:10088 load:0x40080400,len:6380 entry 0x400806a4

I have tried running my task on cpu1 or core 1 too but wifi is automatically running on cpu or core0. 我已经尝试在cpu1或核心1上运行我的任务但是wifi会自动在cpu或core0上运行。 And getting the same error. 并得到同样的错误。 have also tried adding delays but nothing works. 我也试过添加延迟,但没有任何作用。



char *wssid = "PTCL-TB";
char *wpassword = "pakistan";

bool connected2Wifi = false;
void setup() {
 // put your setup code here, to run once:

 Serial.begin(115200);
 delay(10);
 Serial.println('\n');

 WiFi.begin(wssid, wpassword);             // Connect to the network
 Serial.print("Connecting to ");
 Serial.print(wssid);

 while (WiFi.status() != WL_CONNECTED) { // Wait for the Wi-Fi to connect
   delay(500);
   Serial.print('.');
 }

 Serial.println('\n');
 Serial.println("Connection established!");  
 Serial.print("IP address:\t");
 Serial.println(WiFi.localIP()); 
}

void loop() {
 // put your main code here, to run repeatedly:

} ```

I want to connect to wifi in this task. It's very simple and i have also copied it from a reliable source whose code was running. but the error seems to be rigid.

转到工具 - > CPU频率并将其设置为160,80或240 MHz(支持WiFi / BT的那些)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM