0

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. 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.

ERROR LOG E (42418) task_wdt: Task watchdog got triggered. 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. abort() was called at PC 0x400d96f7 on core 0

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

Rebooting... ets Jun 8 2016 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

I have tried running my task on cpu1 or core 1 too but wifi is automatically running on cpu or 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.

1 Answer 1

0

Go to Tools -> CPU Frequency and set it to 160, 80 or 240 MHz (the ones that support WiFi/BT).

Sign up to request clarification or add additional context in comments.

1 Comment

You are a savior. Cheers! (Y)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.