Problem with watchdog !
Posted: Fri Jan 26, 2024 7:17 pm
Every ca. 6 secund I get this out of ESP32.
E (85334) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (85334) task_wdt: - IDLE (CPU 0)
E (85334) task_wdt: Tasks currently running:
E (85334) task_wdt: CPU 0: Task1
E (85334) task_wdt: CPU 1: IDLE
E (85334) task_wdt: Print CPU 0 (current core) backtrace
Backtrace: 0x400D826B:0x3FFB0D20 0x400D83F2:0x3FFB0D40 0x400829B9:0x3FFB0D60 0x400D6213:0x3FFB8380 0x400D567F:0x3FFB83C0 0x40087D89:0x3FFB83F0
I need to run a task that is scanning a huge led matrix 64x32 rgb leds. I have tryed many solution found on the internet.
Eiher dos it not work at all or it slows the scanning down resulting at the display is twinkle. her is the code, the outer loop have to run ca.1600 times a secund and the inner loop 102400 times a secund to avoid twinkle.
xTaskCreatePinnedToCore(Task1code,"Task1",10000,NULL,1,&Task1,0);
void Task1code(void * pvParameters)
{
while(1)
{
if(LedRow>7)
{
L=1;
H=3;
}
else
{
L=0;
H=2;
}
Msk=1;
Msk=Msk << (LedRow & 7);
for(int k=0;k<64;k++)
{
Rtmp1=Red[k][L];
Gtmp1=Green[k][L];
Btmp1=Blue[k][L];
Rtmp2=Red[k][H];
Gtmp2=Green[k][H];
Btmp2=Blue[k][H];
gpio_set_level(R1,Rtmp1 & Msk);
gpio_set_level(G1,Gtmp1 & Msk);
gpio_set_level(B1,Btmp1 & Msk);
gpio_set_level(R2,Rtmp2 & Msk);
gpio_set_level(G2,Gtmp2 & Msk);
gpio_set_level(B2,Btmp2 & Msk);
gpio_set_level(CLK,1);
gpio_set_level(CLK,0);
}
gpio_set_level(OE,1);
gpio_set_level(AA,LedRow & 1);
gpio_set_level(AB,LedRow & 2);
gpio_set_level(AC,LedRow & 4);
gpio_set_level(AD,LedRow & 8);
gpio_set_level(OE,0);
LedRow++;
if(LedRow==16) LedRow=0;
}
}
Regards
Erik Madsen
E (85334) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (85334) task_wdt: - IDLE (CPU 0)
E (85334) task_wdt: Tasks currently running:
E (85334) task_wdt: CPU 0: Task1
E (85334) task_wdt: CPU 1: IDLE
E (85334) task_wdt: Print CPU 0 (current core) backtrace
Backtrace: 0x400D826B:0x3FFB0D20 0x400D83F2:0x3FFB0D40 0x400829B9:0x3FFB0D60 0x400D6213:0x3FFB8380 0x400D567F:0x3FFB83C0 0x40087D89:0x3FFB83F0
I need to run a task that is scanning a huge led matrix 64x32 rgb leds. I have tryed many solution found on the internet.
Eiher dos it not work at all or it slows the scanning down resulting at the display is twinkle. her is the code, the outer loop have to run ca.1600 times a secund and the inner loop 102400 times a secund to avoid twinkle.
xTaskCreatePinnedToCore(Task1code,"Task1",10000,NULL,1,&Task1,0);
void Task1code(void * pvParameters)
{
while(1)
{
if(LedRow>7)
{
L=1;
H=3;
}
else
{
L=0;
H=2;
}
Msk=1;
Msk=Msk << (LedRow & 7);
for(int k=0;k<64;k++)
{
Rtmp1=Red[k][L];
Gtmp1=Green[k][L];
Btmp1=Blue[k][L];
Rtmp2=Red[k][H];
Gtmp2=Green[k][H];
Btmp2=Blue[k][H];
gpio_set_level(R1,Rtmp1 & Msk);
gpio_set_level(G1,Gtmp1 & Msk);
gpio_set_level(B1,Btmp1 & Msk);
gpio_set_level(R2,Rtmp2 & Msk);
gpio_set_level(G2,Gtmp2 & Msk);
gpio_set_level(B2,Btmp2 & Msk);
gpio_set_level(CLK,1);
gpio_set_level(CLK,0);
}
gpio_set_level(OE,1);
gpio_set_level(AA,LedRow & 1);
gpio_set_level(AB,LedRow & 2);
gpio_set_level(AC,LedRow & 4);
gpio_set_level(AD,LedRow & 8);
gpio_set_level(OE,0);
LedRow++;
if(LedRow==16) LedRow=0;
}
}
Regards
Erik Madsen