ESP32-EVB Ethernet restarting and code not working

Started by MeisterQ, November 18, 2022, 01:22:37 PM

Previous topic - Next topic

MeisterQ

Hello,

i got a problem with my ESP32 EVB Board.

Im using a Sketch to get Data over Softwareserial (GPIO13 and 16) and converting it, to transmit it via CAN.

On CAN im using GPIO5 and 35. So everything works fine untill im uploading the Code again to the Board.

After uploading it, the Ethernet LEDs keep going on and off within 5 or 10 seconds. Code is not working in this moment.

After pressing the reset Button afew times, it start working normally untill im uploading a new sketch (Im using OTA Upload).

Now i found out on wiring diagram, GPIO0 is connected to LAN8710A and Q50MHz.

By any chance, somebody know if OTA Upload, or LAN connection to this board, or any GPIO im Using influences the board by booting in any relation?

Im sure, it worked great, untill i addet all the Serial stuff which is using GPIO13 and 16.

But in wiring diagram, this 2 GPIOs only are connected to UEXT connector for SCL and SDA.

Im using REV I

Thanks alot.

LubOlimex

Out of the 4 pins you mentioned (GPIO5, GPI35, GPIO13, GPIO16) only GPIO5 might affect anything since it is bootstrapping pin.

Try to put delay at the start. This might fix the issue. Like if you are using Arduino just right after

void setup(){

delay(1000);

On a side note, try our CAN library and example for ESP32-EVB from here:

https://github.com/OLIMEX/ESP32-EVB/tree/master/SOFTWARE/Arduino%20IDE%20examples/CAN_library_and_examples
Technical support and documentation manager at Olimex

MeisterQ

Hello,

thank you for your reply.

Yes GPIO5 is connected to CAN, but CAN Transceiver does not get influenced by anything.

Ive put the delay on setup and i will try uploading code and will give a feedback if it worked.

Thank you

MeisterQ

So ive uploadet the Code yesterday afew times and with this delay, the restarts are less, but still present.

What could i do?

MeisterQ

Hello together.

I still having this trouble with the Ethernet-Restarting EVB Board.

Im using newst ESP32 JSON, im using newst Librarys. I dont know what to do anymore.

Please help

LubOlimex

But did you try this library exactly:

https://github.com/OLIMEX/ESP32-EVB/tree/master/SOFTWARE/Arduino%20IDE%20examples/CAN_library_and_examples

There are some specifics on the CAN which is described there namely:

"The two examles ESP32-EVB_CAN and ESP32-EVB_CAN_Relay_Toggle were written for Olimex and there is description on the usage inside each example.

This library is patched version of the original: https://github.com/miwagner/ESP32-Arduino-CAN by Michael Wagner

The patch includes a fix suggested in this pull request: miwagner/ESP32-Arduino-CAN#33 to resolve the differences between modules caused by the ECO3 feature of Espressif on ESP32-WROOM-32E: https://www.esp32.com/viewtopic.php?t=15581

It also has 2 extra examples specifically for Olimex board ESP32-EVB rev.I.

Without this patch new and old ESP32-WROOM can't communicate through CAN with each other due to the halved speed of the new modules or you should double the CAN speed of the ESP32-WROOM-32E."
Technical support and documentation manager at Olimex

MeisterQ

Hi,

thanks for your reply.

I think the main problem is caused by this: https://github.com/espressif/esp-idf/issues/5965

After a hard-reset, everything is working great. CAN Communication is established, devices are reachable over IP, but after uploading a new sketch via OTA, OR sending an "ESP.restart()" on software, the esp cant establish its network connection anymore.

The lights on the Ethernet-Port are going on for 2 seconds, then turning off, turning on, turning off, etc untill i press the reset button or do a powercycle.

I also addet the 1 second delay on void setup() already. Nothing helped.

LubOlimex

Technical support and documentation manager at Olimex

MeisterQ

So, what do you think is the solution for this now?