Search found 11 matches

by solarjoe
Sun Nov 15, 2020 11:19 am
Forum: ESP32 boards
Topic: Can't connect WiFi after restart
Replies: 23
Views: 24974

Re: Can't connect WiFi after restart

I just had the same problem when trying to use the Async MQTT client. When connecting to the Wifi for the first time manually in boot.py it worked fine, but when the MQTT client was trying to reconnect to a broker that had been gone I got the error wifi: STA_DISCONNECTED, reason:15 (4WAY_HANDSHAKE_T...
by solarjoe
Sat Nov 14, 2020 9:20 am
Forum: ESP32 boards
Topic: How to interpret the ESP32 wifi logging messages?
Replies: 1
Views: 1154

How to interpret the ESP32 wifi logging messages?

Hello, I am running endurance tests on a ESP32-PICO at the moment. From time to time there are wifi connection interrupts and sometimes, not sure if this is during the interrupts, there are messages like I (5558837) wifi:new:<6,0>, old:<6,2>, ap:<255,255>, sta:<6,0>, prof:1 I (5559857) wifi:new:<6,2...
by solarjoe
Fri Oct 30, 2020 8:50 am
Forum: General Discussion and Questions
Topic: Problem with interrupt callback being called all the time without button being pressed
Replies: 12
Views: 5938

Re: Problem with interrupt callback being called all the time without button being pressed

Ok, now that I know what to search for: https://github.com/m5stack/M5Stack/issues/52 https://forum.lvgl.io/t/problems-with-interface-after-connecting-to-network/2130 Meanwhile I also contacted m5stack support via email, directed them to this post and they told me this: "…btn read can`t use irq event...
by solarjoe
Fri Oct 30, 2020 8:40 am
Forum: General Discussion and Questions
Topic: Problem with interrupt callback being called all the time without button being pressed
Replies: 12
Views: 5938

Re: Problem with interrupt callback being called all the time without button being pressed

Ok, I get it now. You could be onto something. With the very simple program that cycles the LED color on button press the trigger is IRQ_FALLING, and that works fine. But there is also no WiFi. That could indeed be the reason. I will dig into this. Above I mentioned that the timing of the callback i...
by solarjoe
Fri Oct 30, 2020 7:31 am
Forum: General Discussion and Questions
Topic: Problem with interrupt callback being called all the time without button being pressed
Replies: 12
Views: 5938

Re: Problem with interrupt callback being called all the time without button being pressed

I tried if there is a difference when I change the trigger, but there is none trigger = Pin.IRQ_FALLING | Pin.IRQ_RISING trigger = Pin.IRQ_RISING trigger = Pin.IRQ_FALLING All show the same behaviour and the automatic triggering of the callback always stops it the button is pressed and hold. I would...
by solarjoe
Fri Oct 30, 2020 7:21 am
Forum: General Discussion and Questions
Topic: Problem with interrupt callback being called all the time without button being pressed
Replies: 12
Views: 5938

Re: Problem with interrupt callback being called all the time without button being pressed

I have more information on this. I tried another ESP32 dev kit, the M5Stack Atom Matrix, instead of the Atom Lite, but the issue stays the same. So the hardware is not broken. The interrupt is defined as pin = machine.Pin(39, machine.Pin.IN, machine.Pin.PULL_UP) trigger_all = Pin.IRQ_FALLING | Pin.I...
by solarjoe
Fri Oct 30, 2020 6:56 am
Forum: General Discussion and Questions
Topic: Problem with interrupt callback being called all the time without button being pressed
Replies: 12
Views: 5938

Re: Problem with interrupt callback being called all the time without button being pressed

Simple program that changes the LED colour on button press -- works totally fine Yes. Simple program that occasionally sends MQTT messages -- works totally fine Yes. First program that now sends an MQTT message instead of setting the LED colour -- causes reboots and repeat messages No, the MQTT mes...
by solarjoe
Thu Oct 29, 2020 9:58 pm
Forum: General Discussion and Questions
Topic: Problem with interrupt callback being called all the time without button being pressed
Replies: 12
Views: 5938

Re: Problem with interrupt callback being called all the time without button being pressed

It's GPIO39 of the ESP32-PICO. The pull-up for the switch is just done pin = machine.Pin(39, machine.Pin.IN, machine.Pin.PULL_UP) And at least for the build-in button, I think it's not possible to tinker with it. There is a little schematic at the bottom https://docs.m5stack.com/#/en/core/atom_lite ...
by solarjoe
Thu Oct 29, 2020 7:20 pm
Forum: General Discussion and Questions
Topic: Problem with interrupt callback being called all the time without button being pressed
Replies: 12
Views: 5938

Problem with interrupt callback being called all the time without button being pressed

Hello all, I have a strange problem and hope that you have some ideas. Hardware is a ESP32-PICO D4 in a M5Stack Atom Lite. My first program to test interrupts in general works like a charm, it changes the color of the LED when the button is pressed. There are not bounces, color skips or what ever. T...
by solarjoe
Thu Oct 29, 2020 7:09 am
Forum: General Discussion and Questions
Topic: Why does my ISR callback work even though I am allocating memory?
Replies: 2
Views: 1271

Re: Why does my ISR callback work even though I am allocating memory?

ESP32 this kwarg is ignored
Thanks for your answer, that was new to me.

Code: Select all

Pin.irq(..., hard=False)

hard: Hard interrupt handlers may not allocate memory; see Writing interrupt handlers. Not all ports support this argument.