Page 1 of 2
UART dark after flashing
Posted: Sat Feb 25, 2017 4:20 pm
by BuddyCasino
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?
Re: UART dark after flashing
Posted: Sat Feb 25, 2017 4:38 pm
by kolban
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?
Re: UART dark after flashing
Posted: Sat Feb 25, 2017 5:10 pm
by BuddyCasino
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.
Re: UART dark after flashing
Posted: Mon Feb 27, 2017 4:32 am
by ESP_Angus
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
Re: UART dark after flashing
Posted: Mon Feb 27, 2017 7:26 pm
by BuddyCasino
> 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.
Re: UART dark after flashing
Posted: Mon Feb 27, 2017 11:17 pm
by ESP_Angus
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
Re: UART dark after flashing
Posted: Tue Feb 28, 2017 9:15 am
by BuddyCasino
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.
Re: UART dark after flashing
Posted: Wed Mar 15, 2017 8:31 am
by BuddyCasino
Re: UART dark after flashing
Posted: Wed Apr 12, 2017 6:54 am
by BuddyCasino
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.
Re: UART dark after flashing
Posted: Thu Apr 13, 2017 5:52 pm
by BuddyCasino
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)