Chat freely about anything...

User avatar
By fgomes
#75461 Hi, I have received some sample PCBs assembled with ESP12F modules. I've verified the power supply and the ESP12 connections and they seem to be ok. I've been able to talk with the ESP12 using AT commands, so the Rx and Tx are correctly connected. I'm able to boot it by the code in the flash (AI-Thinker), it states boot mode (3,7) or (3,0) depending if it is a power-up or a reset. I was also able to boot it in programming mode (tying GPIO0 to gnd), it states boot mode (1,7) or (1,0) depending if it is a power-up or a reset. The problem I'm facing is that I am not able to program it, Arduino states espcomm_sync_error every time I try it, I observe that the ESP12F receives several commands but never answers to Arduino, so the process never ends well (The ESP Tx led never blinks in the programming attempt, only the Rx led blinks). Also using the NodeMCU flasher tool was not able to get the node MAC addresses or to program it, like I do with other ESP12 modules, including other ESP12F modules I have. What do you think could be the problem? A bad ESP12F module that works but doesn't answer to programming commands (maybe crashes after booting from the internal bootloader)? Connecting it to putty when booting in programming mode, I only observe the boot mode line (reset cause 2, boot mode (1,0) or (1,7) as I state above). I'll try to remove it and test it on other board, but since these were professionally assembled boards in a pick and place line I was trying to avoid that until now, but all my ideas were tested.

Another test I did was to observe the Rx line on the ESP12F and noticed that it changes normally when I transmit data from putty when it is in normal mode, but it is stuck to 3.3V when it boots in bootloader mode (it only fluctuates a few millivolts below 3.3V when it receives data. This seems a bad ESP12F module, doesn't it? I've tried with two different FTDI adapters and had the same behavior.

Thanks in advance!

Fernando
User avatar
By QuickFix
#75462
fgomes wrote:some[...]seem

Word 1 ("Some") is a plus, since you have more boards to test results (if you only had one board, it really could be everything).
Although DOA modules do exists (I never had one myself though), the more of the same boards you can test, the smaller the chance becomes of them all being defective.

I never trust word 2 ("Seem"). :roll:
Double check the obvious:
  • Power is 3.3V on Vcc and has caps near the pins
  • GND is really 0V
  • GPIO2 connected to Vcc through resistor
  • GPIO0 pulled high through resistor (run-mode) or short to GND (flash-mode)
  • CH_PD pulled to Vcc through resistor
Please make sure GPIO0, GPIO2 and CH_PD are pulled high using a resistor and not directly tied to Vcc.

Did I already mention you should check the pull-up resistors on the pins? :idea:
User avatar
By fgomes
#75471 Hi QuickFix

Thank you very much for your help! 'Some' in this case equals 2 with me, the remaining are on another continent :-)

Since I already have detected a problem with the LCD board assembled (it is a different variant and the backlight pins have other function on the LCD assembled, that needs separate connections to the backlight), I don't want to power on the other modules before testing this and patching all of them. Today I finally found the magic issue that was happening, it seems that the FTDI adapters that I was using in this test have some compatibility problems with these units (or maybe they are sort of broken). They are my older units, some old USB BUB II from modern devices. When I reported that the Rx signal seems ok when in normal mode but fixed when in bootloader mode, it was not really the case, even in normal mode it didn't drop below 1V (oscillate between 1V and 3.3V), and in bootloader mode only oscillate between 3V and 3.3V. So to take this variable out, I used today some different USB / Serial adapters and has worked flawlessly with them (some cheap Chinese ones, with an FTDI chip that can be fake). But my BUB II still work well with the ATMEGA328 chips, so it seems that the ESP12 has some internal pull up that changes the behavior if it is in normal mode or bootloader mode and my BUB II adapters don't have enough drive to pull down the voltage on this pin.

Anyway, thank you for your help and I hope that both the issue that I have faced and took me two nights might be useful to others!

Best regards

Fernando