iot_button_cb() not working after few operations / (load switching)

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

iot_button_cb() not working after few operations / (load switching)

Postby Madhav » Sat Jun 25, 2022 12:24 pm

Hi,

We are developing ESP32-Rainmaker based device.

In this device it will have two lamps (relay) and two switch to control lamps.
All functions are working very well if lamp load is not connected to device. If lamp load is connected and switch is operated for 10 to 20 times then switches stops working. In this condition Relays (Lamp load) can be controlled through mobile application [write_cb()]

After debugging it seems that callback function is not getting executed when problem arises. I tried to re-initialise iot_buttons with the help of iot_button_delete(), iot_button_create() and iot_button_set_evt_cb() functions, still it is not working / get recovered.

Please let me know how to resolve this issue.


Regards,

Madhav Lohar

ESP_Piyush
Posts: 307
Joined: Wed Feb 20, 2019 7:02 am

Re: iot_button_cb() not working after few operations / (load switching)

Postby ESP_Piyush » Tue Jul 19, 2022 6:04 pm

Is there any particular speed at which you are pressing the button? Can you share a snippet of your code? At what stage do you see the failure? Is it about the button event not triggering, or is it about a param update not working?

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

Re: iot_button_cb() not working after few operations / (load switching)

Postby Madhav » Thu Jul 21, 2022 9:04 am

Hi Piyush !

Thank you for your reply and enquiring.

Please find herewith my point wise comments with mark MML: in trailing message.

Is there any particular speed at which you are pressing the button?
MML: No there is no such condition related to speed of the button operation. Even if we press it slowly (button press every 5 seconds), this problem is observed.
There is some improvement after setting "CONFIG_IO_GLITCH_FILTER_TIME_MS" to it's maximum value. But still problem is not resolved completely.

Can you share a snippet of your code?
MML: I have used readily available rainmaker-switch application and toggle one port pin (to drive relay driver circuit) in that case also same problem observed.

At what stage do you see the failure?
MML: I have observed that interrupt call back is not getting executed in problematic condition. Rest relay driving circuit works correctly (checked by giving command over Wi-Fi)

Is it about the button event not triggering, or is it about a param update not working?
MML: I think it is about button interrupt trigger not executing.

Regards,

Madhav M. Lohar

Who is online

Users browsing this forum: No registered users and 46 guests