ESP reset issue after receiving continuous interrupt.

Madhav
Posts: 8
Joined: Fri Dec 07, 2018 12:04 pm

ESP reset issue after receiving continuous interrupt.

Postby Madhav » Fri Dec 07, 2018 12:16 pm

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_houwenxiang
Posts: 118
Joined: Tue Jun 26, 2018 3:09 am

Re: ESP reset issue after receiving continuous interrupt.

Postby ESP_houwenxiang » Mon Dec 10, 2018 6:45 am

Hi, Madhav

Have you solved the problem? From your description upon, I can only know that your application is reseted by WDT :D , 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

Madhav
Posts: 8
Joined: Fri Dec 07, 2018 12:04 pm

Re: ESP reset issue after receiving continuous interrupt.

Postby Madhav » Mon Dec 10, 2018 1:06 pm

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

ESP_houwenxiang
Posts: 118
Joined: Tue Jun 26, 2018 3:09 am

Re: ESP reset issue after receiving continuous interrupt.

Postby ESP_houwenxiang » Tue Dec 11, 2018 3:38 am

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 !!
wookooho

Madhav
Posts: 8
Joined: Fri Dec 07, 2018 12:04 pm

Re: ESP reset issue after receiving continuous interrupt.

Postby Madhav » Wed Dec 12, 2018 4:15 am

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.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: ESP reset issue after receiving continuous interrupt.

Postby PeterR » Wed Dec 12, 2018 1:22 pm

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.
& I also believe that IDF CAN should be fixed.

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 102 guests