Go Down

Topic: ESP 32 with dualcore code suddenly not going trough void loop (Read 189 times) previous topic - next topic

Kumalix

Hi,

I have suddenly the problem that my ESP32 dev Module code do not run de VOID loop() section?

It just suddenly stopped working after uploading a scatch.
Thinking it was the scatch so i uploaded the previous version of my code and this one had the same problem.


Everything was going fine but now i don't understand whats going on.
Have a few ESP32 modules and they all seem to have the same problem with the code below.

Testing both cores with the test example scatch works fine. So its not the hardware i think.

And my older scatches don't work to so also no software issue?

Arduino IDE not updated.

i used this method (if there are any others?) for making the scatch run on both cores:https://github.com/SensorsIot/ESP32-Dual-Core

Hope someone can help.

The code is long so you can download it here:
https://www.dropbox.com/s/mhpl0hcm5d1k2oo/Licht_2000_ESP32_neopixel_DualCore_v21.ino?dl=0

BJHenry

Well if the code is so long then the first step is to start removing parts of it so that you can see exactly where the issue is.
How do you know that the loop() isn't running?

Idahowalker

Not downloading some code  to my computer.

What is your setting under Tools | Core Debug Level? If your setting is Debug and you have set up serial, you can view the debug messages on your monitor.

Kumalix

Well if the code is so long then the first step is to start removing parts of it so that you can see exactly where the issue is.
How do you know that the loop() isn't running?
If i put a serial.print line in the loop to display " test" it does not print it to the serial monitor.

Kumalix

After enableing DEBUG i get this on the serial monitor.

Exactly where it should print out the MQTT message that is connected.
This piece of code is located in the mail loop.
 

*WM: 192.168.2.19
connected...yeey :)
saving config
{"LampName":""}local ip
192.168.2.19

LampName: BLYNK Connected
[D][esp32-hal-i2c.c:1345] i2cProcQueue():  Gross Timeout Dead start=0xb82, end=0xbb4, =50, max=50 error=0
[E][esp32-hal-i2c.c:318] i2cDumpI2c(): i2c=0x3ffbed6c
[esp32-hal-i2c.c:319] i2cDumpI2c(): dev=0x60013000 date=0x16042000
[esp32-hal-i2c.c:321] i2cDumpI2c(): lock=0x3ffcf990
[esp32-hal-i2c.c:323] i2cDumpI2c(): num=0
[esp32-hal-i2c.c:324] i2cDumpI2c(): mode=1
[esp32-hal-i2c.c:325] i2cDumpI2c(): stage=3
[esp32-hal-i2c.c:326] i2cDumpI2c(): error=0
[esp32-hal-i2c.c:327] i2cDumpI2c(): event=0x3ffcfbc0 bits=0
[esp32-hal-i2c.c:328] i2cDumpI2c(): intr_handle=0x3ffcf9f0
[esp32-hal-i2c.c:329] i2cDumpI2c(): dq=0x3ffcfb9c
[esp32-hal-i2c.c:330] i2cDumpI2c(): queueCount=1
[esp32-hal-i2c.c:331] i2cDumpI2c(): queuePos=0
[esp32-hal-i2c.c:332] i2cDumpI2c(): errorByteCnt=-1
[esp32-hal-i2c.c:333] i2cDumpI2c(): errorQueue=0
[esp32-hal-i2c.c:334] i2cDumpI2c(): debugFlags=0x00000000
[esp32-hal-i2c.c:311] i2cDumpDqData(): Debug Buffer not Enabled
[esp32-hal-i2c.c:354] i2cDumpInts(): Debug Buffer not Enabled
[esp32-hal-i2c.c:1130] i2cProcQueue(): Bus busy, reinit

Kumalix

Found the problem after debug info.
My BMP280 temp sensor is only connected with i2C so when i replaced it it works again.

Seems that the sensor is messing the i2C bus.

thanks: Idahowalker for the debug tip. Could have think about it my self

Idahowalker


Go Up