UART dark after flashing

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

UART dark after flashing

Postby BuddyCasino » Sat Feb 25, 2017 4:20 pm

1) flash firmware
2) "Hard resetting..."
3) I open a 'screen' session to watch the serial console
4) nothing shows up

I have to unplug the ESP32 first. Is this fixable?

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: UART dark after flashing

Postby kolban » Sat Feb 25, 2017 4:38 pm

Have you tried running "make monitor"? The ESP-IDF contains a built in serial logger which I find to be extremely useful. I too had problems with "screen" but after switching to "make monitor", Ive never looked back. If that doesn't help, let us also ask:

1. What is your PC environment?
2. What kind of ESP32 board do you have?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: UART dark after flashing

Postby BuddyCasino » Sat Feb 25, 2017 5:10 pm

Same issue. Output:

Code: Select all

Leaving...
Hard resetting...
--- forcing DTR inactive
--- forcing RTS inactive
--- Miniterm on /dev/tty.SLAB_USBtoUART  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
Then: silence.

I use this board, which is pin-compatible with the Espressif board: http://www.watterott.com/de/ESP-WROOM32-Breakout
I'm on macOS.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: UART dark after flashing

Postby ESP_Angus » Mon Feb 27, 2017 4:32 am

That seems very unusual.

If you press and release the "EN" button while the monitor is running, do you see any output then?

If you measure the voltage on the "EN" pin while the monitor is running, what is it?

At a glance, the reset circuit for the breakout board you have is slightly different to the ESP32 Core Board reset circuit (uses FETs not BTJs.) Off the top of my head I can't think of a reason this would matter, but it's probably worth asking the hardware vendor if there are known issues with the board.

Angus

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: UART dark after flashing

Postby BuddyCasino » Mon Feb 27, 2017 7:26 pm

> If you press and release the "EN" button while the monitor is running, do you see any output then?
No effect.

> If you measure the voltage on the "EN" pin while the monitor is running, what is it?
I get 3.3v.

Didn't even know its not supposed to be that way, bought that board because the official Espressif ones were unobtainium. Will ask the manufacturer if they have an idea whats up.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: UART dark after flashing

Postby ESP_Angus » Mon Feb 27, 2017 11:17 pm

BuddyCasino wrote:> If you press and release the "EN" button while the monitor is running, do you see any output then?
No effect.

> If you measure the voltage on the "EN" pin while the monitor is running, what is it?
I get 3.3v.
Hi Buddy,

The other thing to try is to press the "EN" pin while the monitor running, and verify the voltage on the pin goes to 0V (or close to it) while the pin is held down.

If that's the case, the low-to-high transition when you release the EN pin should almost certainly reset the chip, and you should see -something- on the UART at 115200bps when the reset happens.

I'd be tempted to say you have faulty hardware, except that doesn't explain why you can flash perfectly fine.

Checking with the hardware manufacturer is also a good next step.


Angus

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: UART dark after flashing

Postby BuddyCasino » Tue Feb 28, 2017 9:15 am

Manufacturer says they are not aware of any issues and suspects a driver issue with the usb-to-serial briddge.
Thanks for your help, if I figure something out I'll post it here.

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: UART dark after flashing

Postby BuddyCasino » Wed Mar 15, 2017 8:31 am

It seems there is indeed a driver issue at play, thanks to watterott.com for pointing this out:

https://twitter.com/hamityanik/status/8 ... 4253376516
http://community.silabs.com/t5/Interfac ... d-p/190476

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: UART dark after flashing

Postby BuddyCasino » Wed Apr 12, 2017 6:54 am

And again Andreas Watterott saves the day. He sent me a workaround for esptool.py, which seems to work:

Code: Select all

    def hard_reset(self):
        self._port.setRTS(True)  # EN->LOW
        time.sleep(0.1)
        self._port.setRTS(False)
        time.sleep(0.1)
        self._port.close()
        time.sleep(3)
The problem manifests itself when the port is closed and immediately opened again, while data is arriving, which is why the pause fixes it.

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: UART dark after flashing

Postby BuddyCasino » Thu Apr 13, 2017 5:52 pm

Just tested it with a 0.1 pause and it works, so theres really no downside to this fix:

Code: Select all

    def hard_reset(self):
        self._port.setRTS(True)  # EN->LOW
        time.sleep(0.1)
        self._port.setRTS(False)
        time.sleep(0.1)
        self._port.close()
        time.sleep(0.1)

Who is online

Users browsing this forum: Bing [Bot] and 255 guests