Giter VIP home page Giter VIP logo

Comments (4)

sim0njo avatar sim0njo commented on June 24, 2024

After some experimenting.... disconnecting the Gpio0/RST pins on the USB-2-TTL convertor makes the T-ETH-Lite-ESP32 work more stable.

Still, when I try to start any software induced activity on the RS485 bus connected to UART_2, the module reboots.

Since my code is running for nearly 4 years on a WROVER, I conclude that I must look more closely to the T-ETH hardware design.

What are the advised GPIO's for setting up UART_2 on the T-ETH-Lite-ESP32 ???

from lilygo-t-eth-series.

lewisxhe avatar lewisxhe commented on June 24, 2024

If it is ESP32, then the best available IO RX 33,39, 35,38,TX,33,32

0,2,4,13,14,15 are all ESP32 Strapping Pins. You need to understand the ESP32 pair before using it. Limitations on these Pins

https://www.espressif.com.cn/sites/default/files/documentation/esp32-wrover-e_esp32-wrover-ie_datasheet_en.pdf
image

from lilygo-t-eth-series.

sim0njo avatar sim0njo commented on June 24, 2024

Thank you for reminding me of the strapping pins of WROVER-E.

  1. The document you refer to above (v1.9 dated 2023) shows following 5 strapping bits:
  • GPIO05
  • MTDO -> GPIO15
  • GPIO02
  • GPIO00
  • MTDI -> GPIO12
  1. Next I looked at the T-ETH-Lite-ESP32 schematic, there are just a limited amount of GPIO available on the module's pin headers and following GPIOs are used for the onboard SD connection:
  • GPIO34 = SD_MISO, has TVS diode connected to GND
  • GPIO13 = SD_MOSI, has TVS diode connected to GND and 10K pullup resistor
  • GPIO14 = SD_SCK, has TVS diode connected to GND
  • GPIO05 = SD_CS, has TVS diode connected to GND
  1. GPIO32/33 are used for the I2C bus

  2. Considering the fact that I have successfully used GPIO02 (as TX) and GPIO04 (as RX) in the past with a Zigbee coordinator SM-011, and GPIO14 for the RTS signal

  3. I come to the conclusion that following combination should work:

  • GPIO02 = RS485 TX
  • GPIO04 = RS485 RX
  • GPIO14 = RS485 RTS with 10K pulldown resistor, the TVS in place is removed by now to exclude interference

In this configuration my RS485 circuitry does not impact bootstrapping pins and the ESP32 operates correctly, I can enable the ethernet link and get an IP address, also the different server processes of my app startup (webserver, management interface, MQTT client, rule server, ...)

  1. After all this, I got the RS485 working/crashing at random... till I finally decoded the crash backtrace to see an I2C call happening in the middle of my UART ISR. Aha !!!

Didn't I come short of GPIO pins for my 2 LEDs (red/blue) and replaced these with an I2C IO extender, where the red LED is used to indicate traffic on the RS485 bus. Aha again !!!

So I put the calls to set the LED state within an ISR in comment, and yes this fixed it.

from lilygo-t-eth-series.

github-actions avatar github-actions commented on June 24, 2024

This issue is stale because it has been open for 30 days with no activity.

from lilygo-t-eth-series.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.