Hi,
we got stuck in one problem related to continuous interrupt to ESP32.
It's details are as below.
1) We are trying to develop phase dimmer lamp using ESP32.
2) Here we require to handle Zero Cross interrupt at every 10/8 mSec. along with 1 timer (duration 0-10 mSec) to trigger Triac/MOSFET gate
3) We have observed that ESP32 is getting watchdog reset in our application developed considering above two points.
4) Please note that presently we are not using any other functionalities here in our application.
5) We are using latest ESP-IDF version.
kindly guide us to resolve this issue.
ESP reset issue after receiving continuous interrupt.
-
- Posts: 118
- Joined: Tue Jun 26, 2018 3:09 am
Re: ESP reset issue after receiving continuous interrupt.
Hi, Madhav
Have you solved the problem? From your description upon, I can only know that your application is reseted by WDT , could you please provide more information?
1. Did you use any interrupt?
2.Can your board start normally if don't control anything ?
thanks !!
Have you solved the problem? From your description upon, I can only know that your application is reseted by WDT , could you please provide more information?
1. Did you use any interrupt?
2.Can your board start normally if don't control anything ?
thanks !!
wookooho
Re: ESP reset issue after receiving continuous interrupt.
Hi !
Thank you for your reply.
Still this problem is not resolved.
1. Here I am not using any interrupts other than ZCD interrupt (External interrupt)
2. Yes, my board start normally if I don't control anything.
Even if I stop ZCD signal my board starts normally with same application, when I connect ZCD signal to the GPIO it starts giving WDT reset log on serial port.
Madhav
Thank you for your reply.
Still this problem is not resolved.
1. Here I am not using any interrupts other than ZCD interrupt (External interrupt)
2. Yes, my board start normally if I don't control anything.
Even if I stop ZCD signal my board starts normally with same application, when I connect ZCD signal to the GPIO it starts giving WDT reset log on serial port.
Madhav
-
- Posts: 118
- Joined: Tue Jun 26, 2018 3:09 am
Re: ESP reset issue after receiving continuous interrupt.
Hi,
You are using a gpio interrupt, is my understanding right?
If yes, what trigger method is used(rising edge, falling edge or level)? there may be three reasons for this problem:
1. An interrupt was generated when your application was not fully initialized(some uninitialized variables are used in the interrupt).
2. Interrupt status cannot be cleared and the interrupt cannot be exited
3. An operation in the interrupt takes too much time.
Can you provide your interrupt handing code?
thanks !!
You are using a gpio interrupt, is my understanding right?
If yes, what trigger method is used(rising edge, falling edge or level)? there may be three reasons for this problem:
1. An interrupt was generated when your application was not fully initialized(some uninitialized variables are used in the interrupt).
2. Interrupt status cannot be cleared and the interrupt cannot be exited
3. An operation in the interrupt takes too much time.
Can you provide your interrupt handing code?
thanks !!
wookooho
Re: ESP reset issue after receiving continuous interrupt.
Hi,
Thank you for your quick reply.
Yes ! you are right I am using GPIO interrupt.
I am using falling edge interrupt.
I worked on points suggested by you, please find my comments as follows.
1. An interrupt was generated when your application was not fully initialized(some uninitialized variables are used in the interrupt).
Re1 :- I have checked all peripherals and Initialization part is over and after that I have Enabled ZCD interrupt.
Also I have stopped ZCD signal physically and let the application initialize and settle completely then after some time I started ZCD signal in this case also controller starts reset.
2. Interrupt status cannot be cleared and the interrupt cannot be exited
Re2 :- Yes followed.
3. An operation in the interrupt takes too much time.
Re3 :- I have optimized it to most possible level. Now interrupt handling code is of few lines which just updates few flags trigger pins and returns back.
Madhav.
Thank you for your quick reply.
Yes ! you are right I am using GPIO interrupt.
I am using falling edge interrupt.
I worked on points suggested by you, please find my comments as follows.
1. An interrupt was generated when your application was not fully initialized(some uninitialized variables are used in the interrupt).
Re1 :- I have checked all peripherals and Initialization part is over and after that I have Enabled ZCD interrupt.
Also I have stopped ZCD signal physically and let the application initialize and settle completely then after some time I started ZCD signal in this case also controller starts reset.
2. Interrupt status cannot be cleared and the interrupt cannot be exited
Re2 :- Yes followed.
3. An operation in the interrupt takes too much time.
Re3 :- I have optimized it to most possible level. Now interrupt handling code is of few lines which just updates few flags trigger pins and returns back.
Madhav.
Re: ESP reset issue after receiving continuous interrupt.
Post your setup and handler code.
A ZCD interrupt should be the same as any other - except for the circuit.
I can only imagine that there is an issue with your comparator circuit & that you are being flooded with interrupts.
What if you add a pullup and use some linking wire to connect the interrupt GPIO to 3.3V then GND?
EDIT: So if you manually fire the interrupt once or twice without issue (swapping 3.3V then GROUND) then it suggests you circuit is overloading you.
A ZCD interrupt should be the same as any other - except for the circuit.
I can only imagine that there is an issue with your comparator circuit & that you are being flooded with interrupts.
What if you add a pullup and use some linking wire to connect the interrupt GPIO to 3.3V then GND?
EDIT: So if you manually fire the interrupt once or twice without issue (swapping 3.3V then GROUND) then it suggests you circuit is overloading you.
& I also believe that IDF CAN should be fixed.
Who is online
Users browsing this forum: Google [Bot] and 108 guests