controlling pwm output with a timer interrupt
Posted: Thu Nov 08, 2018 2:20 am
Hi all,
I am new on forum and also in ESP32. I am using "ledcWrite" command to generate constant frequency, variable duty square wave output.It works fine. I also need to control this pwm with a timer. For example pwm should be enable for 1 second then disable for 1 second. When pwm control function is called from timer interrupt function, following error occurs. I really need help in this matter. Thanks in advance
I am new on forum and also in ESP32. I am using "ledcWrite" command to generate constant frequency, variable duty square wave output.It works fine. I also need to control this pwm with a timer. For example pwm should be enable for 1 second then disable for 1 second. When pwm control function is called from timer interrupt function, following error occurs. I really need help in this matter. Thanks in advance
Code: Select all
***ERROR*** A stack overflow in task IDLE has been detected.
Guru Meditation Error: Core 1 panic'ed (Unhandled debug exception)
Debug exception reason: Stack canary watchpoint triggered (IDLE)
Core 1 register dump:
PC : 0x40007d7a PS : 0x00060936 A0 : 0x80089327 A1 : 0x3ffc7d90
A2 : 0x3ffc1664 A3 : 0x3ffc7dc0 A4 : 0x00000001 A5 : 0x3ffc7e00
A6 : 0x3ffb0000 A7 : 0xbaad5678 A8 : 0x3ff40000 A9 : 0x0000007d
A10 : 0x0000002a A11 : 0x3ffc7f40 A12 : 0x800d0f0d A13 : 0x3ffc7f20
A14 : 0x3ffc24a8 A15 : 0x00000040 SAR : 0x00000013 EXCCAUSE: 0x00000001
EXCVADDR: 0x00000000 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xfffffffb
Core 1 was running in ISR context:
EPC1 : 0x40007d7a EPC2 : 0x00000000 EPC3 : 0x400ea4fa EPC4 : 0x40082db3
Backtrace: 0x40007d7a:0x3ffc7d90 0x40089324:0x3ffc7e20 0x40089340:0x3ffc7e40 0x40086684:0x3ffc7e60 0x40087fa4:0x3ffc7e80 0x40088035:0x3ffc7ea0 βΈ®