Custom board. Can't flash.

almaz1c
Posts: 8
Joined: Mon Aug 28, 2017 4:03 am

Custom board. Can't flash.

Postby almaz1c » Thu Sep 07, 2017 2:55 pm

Hi!
I designed custom board based on ESP8266EX and W25Q32.
ESP8266EX drives by another MCU that is responsible for boot mode selection for ESP8266EX.
Hardware setup to put ESP8266EX to boot mode via UART:
VCC = 3V.
GPIO15 (MTDO) connected directly to the GND all time.

Procedure of flashing is following:
1. RESET pin to low
2. GPIO2 to high
3. GPIO0 to low
4. CH_EN to high5. RESET pin to high
That pins drives another MCU.

The problem is that I can flash only 2 of 5 boards.
I checked voltage levels on all pins using oscilloscope and they all in expected state
excluding GPIO0 which is oscillating continously.

What can be an issue of that?
Does oscillating means that ESP8266EX IC is alive?
Does it can help to flash W25Q32 flash memory IC directly using FlashCAT SPI programmer?

User avatar
pratik
Posts: 467
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: Custom board. Can't flash.

Postby pratik » Fri Sep 08, 2017 1:31 pm

Yes, 40MHz out should mean that there is a high likelihood that the ESP8266 is fine. Are you sure you soldered the chip correctly?
Also, I cannot help without taking a look at the boot log.
When you put ESP into programming mode, it will output something on UART at 74880 bauds. I will need to see that to help.
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

YimingLi
Posts: 51
Joined: Sun May 03, 2015 5:36 pm

Re: Custom board. Can't flash.

Postby YimingLi » Sat Sep 16, 2017 6:17 pm

almaz1c wrote:Hi!
I designed custom board based on ESP8266EX and W25Q32.
ESP8266EX drives by another MCU that is responsible for boot mode selection for ESP8266EX.
Hardware setup to put ESP8266EX to boot mode via UART:
VCC = 3V.
GPIO15 (MTDO) connected directly to the GND all time.

Procedure of flashing is following:
1. RESET pin to low
2. GPIO2 to high
3. GPIO0 to low
4. CH_EN to high5. RESET pin to high
That pins drives another MCU.

The problem is that I can flash only 2 of 5 boards.
I checked voltage levels on all pins using oscilloscope and they all in expected state
excluding GPIO0 which is oscillating continously.

What can be an issue of that?
Does oscillating means that ESP8266EX IC is alive?
Does it can help to flash W25Q32 flash memory IC directly using FlashCAT SPI programmer?



Hi,

it seems that your bootup sequence for burning is OK. But experiences tell us that the GPOIO had better be kept stable low during burning even though that it is theoratically to be low only neccessary upon reset exit and don't care after reset, since the on-chip bootup code might need time to sample the pin so that to enter boot-from-uart mode for burning. Meanwhile, the nRESET might goes high unexpected if the GPIO0 is not stable. I suggest you ties the GPIO0 to GND always and then have a try.

Secondly, if you can, you may please also try to slow down the uart speed when you burn.

Meanwhile, we have one-press burning tools for ESP8266 modules which is very helpful for batch burning. With the burning tool, you only have to have one press on the button of the software to start the burning, and then the burning process will be completed automatically with the help of UART flow control. If you feel interested, you may please get more about it at http://www.ebay.com/itm/282286419729. It is ready with pin connectors for ESP-01, ESP-12 etc. If your module does not have a matched connector here, you may please using 5 flying wires connecting to a connector which is matched with the connector on your module.

Hope it would be helpful.

Yiming

almaz1c
Posts: 8
Joined: Mon Aug 28, 2017 4:03 am

Re: Custom board. Can't flash.

Postby almaz1c » Mon Sep 18, 2017 5:59 am

Hello guys, thank you for your help!
Here is logs from UART during bootup:

Code: Select all

 ets Jan  8 2013,rst cause:2, boot mode:(1,7)

What does that mean?

almaz1c
Posts: 8
Joined: Mon Aug 28, 2017 4:03 am

Re: Custom board. Can't flash.

Postby almaz1c » Mon Sep 18, 2017 6:20 am

Than it changed for

Code: Select all

ets Jan  8 2013,rst cause:2, boot mode:(1,5)
and

Code: Select all

ets Jan  8 2013,rst cause:2, boot mode:(1,4)

almaz1c
Posts: 8
Joined: Mon Aug 28, 2017 4:03 am

Re: Custom board. Can't flash.

Postby almaz1c » Tue Sep 19, 2017 2:55 am

What is second digit y in "boot mode" ?
I am able to get correct x digit in (x,y)
I added capacitor to NRST pin. Replaced flash IC to new empty IC.
Now when I try flash it using UART boot mode I get following:

Code: Select all

rst cause:1, boot mode:(1,0)

It is normal boot from UART, but

Code: Select all

esptool.exe -p COM3 -b 115200 write_flash -ff 40m -fm qio -fs 4m 0x00000 firmware/0x00000.bin 0x10000 firmware/0x10000.bin

Shows me nothing:

Code: Select all

Connecting...
Traceback (most recent call last):
  File "esptool.py", line 567, in <module>
  File "esptool.py", line 160, in connect
Exception: Failed to connect

C:\Espressif\examples\ESP8266\blinky\firmware>

YimingLi
Posts: 51
Joined: Sun May 03, 2015 5:36 pm

Re: Custom board. Can't flash.

Postby YimingLi » Tue Sep 19, 2017 11:53 pm

Hi,

x = sampled from pins of (mtdo io0 io2)
y = sampled from pins of (sd3 sd2 sd0)

x=0 y=don't care -> remapping
x=1 y=don't care -> uart boot (note: flash burn tools use this bootmode for burning)
x=2 y=don't care -> jump boot
x=3 y=don't care -> flash boot(note: normally we use this bootmode if image stored in spi flash)
x=4-7 y!=2 -> SDIO boot modes

Hope it would be helpful.

almaz1c
Posts: 8
Joined: Mon Aug 28, 2017 4:03 am

Re: Custom board. Can't flash.

Postby almaz1c » Wed Sep 27, 2017 12:28 am

Thank you!

Who is online

Users browsing this forum: No registered users and 3 guests