-->
Page 1 of 3

Weird programming problem with a new ESP12E

PostPosted: Wed Oct 21, 2015 6:49 am
by feanor
Hi,
I just got a brand new ESP12E. I connected it to a nice PCB with all the components to properly power it, reset (with the customary RC and a reset button) and reflash (with a 3.9K pullup and a button connected to GPIO0). The other programming pins were either set to 1 with another pullup or 0 with a pulldown (100 ohm). Power is regulated with a 3.3V linear regulator, properly decoupled and with an additional 330 uf low ESR capacitor as close to the module as I could fit it.
I never managed to make it work with the AT command set. The initial boot message comes at a nonstandard rate, which I can't read with my serial to USB adapter (Prolific chip... sorry). However, I got a trace with a digital scope and it looks fine at about 75 kbps (which is more or less what I expected now that I know that the crystal they are using isn't always 40 Mhz).
Anyway, I tried to reflash several alternative firmwares, with no luck. The flashing process always works (at least there is no error) with a bunch of data transferred to the module (according to the plenty of led activity that I can see when programming), but the AT commands never worked.
So I tried something different. I installed the arduino IDE and compiled a small program to print a string to the serial port at 9600 bps every second. I was happy to see that it worked right after uploading it. However, as soon as I reset the board or power it off the program doesn't run anymore (I assume that it is still in the flash, because I can't see another way it would work at all otherwise).
Same way, I used the SDK to get the information of the kind of flash it has. It is a 32 Mbit chip. I tried to configure the board in several ways (there is a preconfigured 12E, but I also tried custom settings, with both DIO and QIO, different flash frequencies (BTW, I have no idea of the actual frequency it is using). Also tried other come complex programs. In all cases it works right after the programming, but it fails to restart after reset. Again, I can't read the console messages (I will decode the output manually if I have to, or build a rate converter by myself, but I want to avoid both things..).
Any idea?

Re: Weird programming problem with a new ESP12E

PostPosted: Wed Oct 21, 2015 8:42 am
by Touliloup
Have you try to read the serial output at 76800bits/s ? This should normally let you see the boot mode and tell us if your esp is starting in flash mode or any other mode.

Re: Weird programming problem with a new ESP12E

PostPosted: Wed Oct 21, 2015 3:31 pm
by Barnabybear
Hi, it sounds like your still in flash mode for some reason. Check the voltage on GPIO 0.
In flash mode AT commands will not work.
When flashed a sketch will run on completion even if GPIO 0 is still low (i.e. still in flash mode) however if powerd off or reset you would need to flash again in order to run it.
Best guess - a short somewere.
Is the button normaly open?

Re: Weird programming problem with a new ESP12E

PostPosted: Wed Oct 21, 2015 6:06 pm
by feanor
Touliloup wrote:Have you try to read the serial output at 76800bits/s ? This should normally let you see the boot mode and tell us if your esp is starting in flash mode or any other mode.

I am afraid that the Prolific chip is quite limited in the bit rates support. I tried to connect it to a Raspberry PI with Debian installed. Its serial port is supposed to be more flexible but I couldn't get anything with sense.
I have several other options, such as building a rate converter (I still have a few old fashioned UARTs and I can generate the proper bit rate to decode anything, but I want to avoid doing such a wiring nightmare.
I will get the DSO trace and decode it by myself... I also bought a few FTDI adapters in China, but I am afraid that I won't get them until...well... January? (Buying stuff online abroad is forbidden in Argentina, so I have to ship it to Miami and wait for some traveler to pick it up).