November 08, 2024, 01:47:56 AM

Problems board Esp32 POE-ISO

Started by InternetOfThings, March 19, 2021, 09:42:03 AM

Previous topic - Next topic

InternetOfThings

Hello everyone,
We are working in a project with 200 Esp32-ISO-POE. We are using 0,2,3,32,33 pins and the MOD-RFID1356MIFARE which is connected to ESP32-ISO-POE via the UART at the UEXT connector.
We found few problems:

1 - Ethernet does not work sometimes: The board sometimes freeze when we use POE. The only solution, that we found, is unplug and plug the ethernet. That problem happens in all boards.

2 - We cant reprogram some boards. The board does not response in Arduino IDE.

What do you think the solution is?

InternetOfThings

1- The problem is in this part of the code:

void WiFiEvent(WiFiEvent_t event)
{
  switch (event) {
    case SYSTEM_EVENT_ETH_START:
      Serial.println("ETH Started");
      //set eth hostname here
      ETH.setHostname("esp32-ethernet");
      break;
    case SYSTEM_EVENT_ETH_CONNECTED:
      Serial.println("ETH Connected");
      break;
    case SYSTEM_EVENT_ETH_GOT_IP:
      Serial.print("ETH MAC: ");
      Serial.print(ETH.macAddress());
      Serial.print(", IPv4: ");
      Serial.print(ETH.localIP());
      if (ETH.fullDuplex()) {
        Serial.print(", FULL_DUPLEX");
      }
      Serial.print(", ");
      Serial.print(ETH.linkSpeed());
      Serial.println("Mbps");
      eth_connected = true;
      break;
    case SYSTEM_EVENT_ETH_DISCONNECTED:
      Serial.println("ETH Disconnected");
      eth_connected = false;
      break;
    case SYSTEM_EVENT_ETH_STOP:
      Serial.println("ETH Stopped");
      eth_connected = false;
      break;
    default:
      break;
  }
}


When we call this function via POE, the board freeze and the program stop.

LubOlimex

If the problem is in that part of code - try what happens if you comment out code related to pins used (0,2,3,32,33) then test without the attached hardware (just the ESP32-POE-ISO board, the power supply and the Ethernet connector). These test will show if the behavior is related to the attached hardware and the pins related to it.

> We are using 0,2,3,32,33 pins and the MOD-RFID1356MIFARE which is connected to ESP32-ISO-POE via the UART at the UEXT connector.

GPIO0 and GPIO3 are not good because they are attached to CH340T and might cause some issues in certain scenarios. Also GPIO0 is important bootstrapping pin. Try to use other pins instead of GPIO0 and GPIO3.

GPIO2 is good ONLY if you have no SD card inserted.

About programming boards in Arduino IDE - try different USB port and different USB cable. Try re-installing the CH340T drivers. What operating system are you using? What version of Arduino IDE? What hardware revision are the boards that can't be programmed?


Technical support and documentation manager at Olimex

InternetOfThings

Thx for answer my question.

I already clean the device and test it without atacched hardware and I cant reprogram the board. I test it with differents USB cables, PCs and reinstalling the drivers. We are using windows and the Arduino IDE version 1.8.12. We test it with esp-idf too. The hardware revision is rev.D.

We are using GPIO0 and GPIO3 cause we read that are free to use in https://www.olimex.com/Products/IoT/ESP32/ESP32-POE-ISO/resources/ESP32-POE-ISO-GPIO.png



LubOlimex

Do you see something on the computer when you plug the ESP32 board in question? Somethings pop-ups up? Any entry?

Technical support and documentation manager at Olimex

InternetOfThings

When I plug any of the esp32 poe iso boards which not connect, I just see:

Console: (The last code that I could program it)
# - - - - - - - - - - - - - -  - - - - - - - - - - - - - - - - - - -

08:17:36.014 -> ets Jun  8 2016 00:22:57
08:17:36.014 ->
08:17:36.014 -> rst:0x1 (POWERON_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
08:17:36.014 -> configsip: 0, SPIWP:0xee
08:17:36.014 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
08:17:36.014 -> mode:DIO, clock div:1
08:17:36.014 -> load:0x3fff0018,len:4
08:17:36.014 -> load:0x3fff001c,len:1044
08:17:36.014 -> load:0x40078000,len:8896
08:17:36.014 -> load:0x40080400,len:5816
08:17:36.014 -> entry 0x400806ac
08:17:36.434 -> ETH Started
08:17:36.528 -> deviceId.txt Leído Correctamente

# - - - - - - - - - - - - - - - - - -  - - - - - - - - - - - - - -

When I try to program:
# - - - - - - - - - - -- - - - - - - - - - - -#
El Sketch usa 964454 bytes (73%) del espacio de almacenamiento de programa. El máximo es 1310720 bytes.
Las variables Globales usan 41632 bytes (12%) de la memoria dinámica, dejando 286048 bytes para las variables locales. El máximo es 327680 bytes.
esptool.py v2.6
Serial port COM9
Connecting........_____....._____....._____....._____....._____....._____.....____Ha ocurrido un error mientras se enviaba el sketch
_

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -

LubOlimex

Looks something related to the reset. Maybe erase the flash memory. Use esptool:

https://github.com/espressif/esptool

type esptool.py erase-flash
Technical support and documentation manager at Olimex

InternetOfThings

I used esp idf and esptool.py trying to erase the flash but its seems that cant program either.

# - - - -- - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - -- - - - - -
esptool.py erase_flash
esptool.py v3.0
Found 3 serial ports
Serial port COM9
Connecting........_____....._____....._____....._____....._____....._____....._____
COM9 failed to connect: Failed to connect to Espressif device: Timed out waiting for packet header

LubOlimex

Hmmm it seems many people have similar issue with other ESP32 boards, maybe this will give you some ideas what can be tried:

https://github.com/espressif/arduino-esp32/issues/333
Technical support and documentation manager at Olimex

tapeboy

For anyone finding this and not being able to flash the Esp32POE-ISO board, I was able to force it into flashing mode and load new firmware, by manually connecting pin 0 and 2 to ground. Only then was I able to flash new firmware on it.