Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wemos ESP32 S2 mini cannot boot with UART connected #77

Open
DrBlokmeister opened this issue Jan 27, 2024 · 0 comments
Open

Wemos ESP32 S2 mini cannot boot with UART connected #77

DrBlokmeister opened this issue Jan 27, 2024 · 0 comments

Comments

@DrBlokmeister
Copy link

DrBlokmeister commented Jan 27, 2024

This issue might be related to #62.

I find that in order to boot my ESP32S2 mini, I have to first connect the +5V and GND pins (also connecting pin20), and then make the UART connection. If not, the device gets into an error mode and does not boot. I do this by tilting the board and inserting only one side into my PCB (connecting 5V, GND, PIN 20), wait a few seconds, then plug in the other side, connecting UART. If I follow this procedure, the board boots every time.

If I connect all at once, the status LED blinks slowly and the device does not come online.

I'm using ESPHome and Home Assistant.

I have an HS11A-A controller. There are two RJ45 ports on my controller, and I use one for the display, and the other one for the ESP. My pin config is as follows. Disregard the cable columns, they refer to internal UTP wiring (cable is checked for crosstalk and good connection).

  CABLE CABLE BOARD
Name DESK ESP ESP
RES 1    
SWIM 2    
unknown 3    
PIN 20 4 1 GPIO33
RX 5 6 GPIO9
TX 6 4 GPIO7
GND 7 3 GND
+5V 8 5 Vbus

My UART YAML and virtual screen config is:

uart:
  - id: desk_uart
    baud_rate: 9600
    tx_pin: GPIO7 #Desk RJ45 pin 6, ESP RJ45 pin 4
    rx_pin: GPIO9 #Desk RJ45 pin 5, ESP RJ45 pin 6

switch:
  - platform: gpio
    name: "Virtual Screen"
    pin:
      number: GPIO33 #Desk RJ45 pin 4, ESP RJ45 pin 1
      mode: OUTPUT
    restore_mode: ALWAYS_ON
    internal: true

Also, I measured the voltage on the UART pins without anything connected. I see 4.7V DC accross the GND and both UART pins. I don't know if this is normal.

Maybe some more relevant ESPHome config:

esphome:
  name: '${espname}'
  comment: 'ESP32S2'
  platformio_options:
    board_build.f_flash: 40000000L
    board_build.flash_mode: dio
    board_build.flash_size: 4MB
    board_build.extra_flags:
      - "-DARDUINO_USB_CDC_ON_BOOT=0"  # Override, defaults to '-DARDUINO_USB_CDC_ON_BOOT=1'
  includes:
    - desk_height_sensor.h
  on_boot:
    priority: -10
    then:
      - button.press: button_m

esp32:
  board: lolin_s2_mini
  variant: ESP32S2
#   framework:
#     type: esp-idf

Are there things I need to look at? Or other suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant