Initial loading of AT firmware on blank flash

guan
Posts: 17
Joined: Wed Oct 29, 2014 8:41 am

Initial loading of AT firmware on blank flash

Postby guan » Tue Nov 04, 2014 2:19 am

I have been trying to load the AT firmware onto a fresh PCB that I have designed, and it is not working I am wondering if I am doing anything wrong. Here is my board:

Image

For comparison, I have been using an ESP-01 module I bought from an Aliexpress vendor. I am using a Saleae logic analyzer because my USB-to-UART module is not capable of the 75000 baud that the bootloader talks.

I am using the flash tool and binaries from version 0.9.2 included with espressif_iot_esp8266_development_kit_20140929.

First of all, the flash tool loaded the 4 bin files successfully at the addresses required for the configuration without cloud upgrade:

Image

I took these flash addresses from the document "7-Espressif IOT Flash 读写说明_v0.2.pdf", page 7. I believe that the flash load was successful because there were no error messages, and the tool displayed my chip's MAC address correctly.

Now, the problem is that when I put GPIO0 back to HIGH (with MTDO still LOW and GPIO2 still HIGH), and I try to boot the AT firmware, the AT "ready" message does not start up. Here is what is displayed from my module at 75000 baud:

Code: Select all

 ets Jan  8 2013 rst cause:1  boot mode:(3 6)

load 0x40100000  len 612  room 16
tail 4
chksum 0xef
load 0x00000000  len 0  room 4
tail 0
chksum 0xef
ho 12 tail 0 room 4
load 0x00000000  len 0  room 12
tail 0
chksum 0xef
csum 0xef
csum err
ets_main.c


And nothing happens after that.

Here is what is displayed with my Aliexpress module:

Code: Select all

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

load 0x40100000  len 24236  room 16
tail 12
chksum 0xb7
ho 0 tail 12 room 4
load 0x3ffe8000  len 3008  room 12
tail 4
chksum 0x2c
load 0x3ffe8bc0  len 4816  room 4
tail 12
chksum 0x46
csum 0x46


(After that the AT firmware starts talking at 115200 baud.)

The flash tool appears to have loaded the firmware correctly. My questions are:

  1. Why does it not boot into the AT firmware as it is supposed to?
  2. Why is "boot mode" listed as (3, 6) instead of (3 7) as with my functional Aliexpress module?
  3. I have MTDO=0, GPIO0=1 and GPIO2=1 when I try to boot from flash. Is there something additional I need to do?
  4. Why are the lengths and checksums apparently wrong?
  5. Is there something additional I have to do to make the ESP8266 chip boot from the AT firmware I have loaded?

Fadi
Posts: 13
Joined: Mon Oct 27, 2014 9:48 am

Re: Initial loading of AT firmware on blank flash

Postby Fadi » Tue Nov 04, 2014 2:35 am

Nice board you got there.

I have started another thread with a similar problem
viewtopic.php?f=7&t=21

Of course I started off with an ESP-01 module and not blank.
hope that we can get this figured out soon.

Fadi

guan
Posts: 17
Joined: Wed Oct 29, 2014 8:41 am

Re: Initial loading of AT firmware on blank flash

Postby guan » Tue Nov 04, 2014 3:54 am

I should add that my flash chip is W25X40CLSNIG.

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: Initial loading of AT firmware on blank flash

Postby costaud » Tue Nov 04, 2014 8:25 am

guan wrote:I should add that my flash chip is W25X40CLSNIG.



Mention that W25X series flash do not support quad i/o mode , please TRY CHOOSING "DOUT" IN THE CONFIG PANEL.

guan
Posts: 17
Joined: Wed Oct 29, 2014 8:41 am

Re: Initial loading of AT firmware on blank flash

Postby guan » Wed Nov 05, 2014 2:02 am

costaud wrote:Mention that W25X series flash do not support quad i/o mode , please TRY CHOOSING "DOUT" IN THE CONFIG PANEL.


Many thanks for pointing this out. I switched it to DIO and the flash speed to 20 MHz just in case that was an issue. Here’s what I get:

Code: Select all

 ets Jan  8 2013 rst cause:1  boot mode:(3 6)

load 0x40100000  len 612  room 16
tail 4
chksum 0x12
load 0x3ffe8000  len 788  room 4
tail 0
chksum 0x50
load 0x3ffe8314  len 264  room 8
tail 0
chksum 0x4a
csum 0x4a

2nd boot version : 1.1
  SPI Speed      : 20MHz
  SPI Mode       : DIO
  SPI Flash Size : 4Mbit
jump to run user1

Fatal exception (0):
epc1=0x401001a2  epc2=0x00000000  epc3=0x00000000  excvaddr=0x00000000  depc=0x00000000
Fatal exception (0):
epc1=0x401001a2  epc2=0x00000000  epc3=0x00000000  excvaddr=0x00000000  depc=0x00000000
Fatal exception (0):
epc1=0x401001a2  epc2=0x00000000  epc3=0x00000000  excvaddr=0x00000000  depc=0x00000000
Fatal exception (0):
epc1=0x401001a2  epc2=0x00000000  epc3=0x00000000  excvaddr=0x00000000  depc=0x00000000


It seems that the second stage bootloader runs, so that’s some progress. The last two lines with Fatal exception repeat indefinitely. I will try other combinations now to see if anything works.

What setting do you guys usually use for flash speed? Is there anything else that could be wrong?

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: Initial loading of AT firmware on blank flash

Postby costaud » Wed Nov 05, 2014 2:31 am

20 MHz might be too slow...

try choosing 40Mhz or 80mhz and dout mode for w25x series.

guan
Posts: 17
Joined: Wed Oct 29, 2014 8:41 am

Re: Initial loading of AT firmware on blank flash

Postby guan » Fri Nov 07, 2014 3:18 am

Thanks again. I managed to get the 0.9.1 AT firmware loaded. Now there’s another problem, and one with 0.9.2, which I’ll try to debug.

guan
Posts: 17
Joined: Wed Oct 29, 2014 8:41 am

Re: Initial loading of AT firmware on blank flash

Postby guan » Tue Nov 11, 2014 2:37 am

I tried to load the 0.9.1 AT binary. That boots, but doesn’t work. Never mind, I should be at 0.9.2 anyway.

I then tried to load the binary at http://bbs.espressif.com/viewtopic.php?f=5&t=13. It seems to load correctly:

Image

Now it does not appear to boot, Here’s the message from the UART bootloader at 75000 baud:

Code: Select all

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

ets_main.c


And then nothing happens after that.

I also tried to load using my understanding of how to do the mode without cloud upgrades. I put user1.bin at 0x00000 and eagle.app.v6.irom0text.bin from espressif_iot_esp8266_updated_files_20141024 at 0x40000:

Image

(What is irom0text? Is it something specific to the code that is being loaded, or general to all firmware?)

This results in the following bootloader messages at 75000 baud:

Code: Select all

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

load 0x40100000  len 23972  room 16
tail 4
chksum 0xc9
load 0x3ffe8000  len 3136  room 4
tail 12
chksum 0xa0
ho 0 tail 12 room 4
load 0x3ffe8c40  len 6212  room 12
tail 8
chksum 0xcb
csum 0xcb
Fatal exception (28):
epc1=0x402114a8  epc2=0x00000000  epc3=0x00000000  excvaddr=0x040001a2  depc=0x00000000
Fatal exception (28):
epc1=0x402114a8  epc2=0x00000000  epc3=0x00000000  excvaddr=0x040001a2  depc=0x00000000
Fatal exception (28):
epc1=0x402114a8  epc2=0x00000000  epc3=0x00000000  excvaddr=0x040001a2  depc=0x00000000
Fatal exception (28):
epc1=0x402114a8  epc2=0x00000000  epc3=0x00000000  excvaddr=0x040001a2  depc=0x00000000
Fatal exception (28):
epc1=0x402114a8  epc2=0x00000000  epc3=0x00000000  excvaddr=0x040001a2  depc=0x00000000


Where the last two lines repeat forever.

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: Initial loading of AT firmware on blank flash

Postby costaud » Fri Nov 14, 2014 1:19 am

your download address is not correct.See below
download.png
download.png (24.95 KiB) Viewed 27390 times

guan
Posts: 17
Joined: Wed Oct 29, 2014 8:41 am

Re: Initial loading of AT firmware on blank flash

Postby guan » Sat Nov 15, 2014 5:54 am

Ah, thanks. Now I get the same error messages.

I tried both the traditional download tool and the wxPython one. Traditional tool:

Image

wxPython tool:

Image

For both tools, I get this output at 75000 baud:

Code: Select all

 ets Jan  8 2013 rst cause:1  boot mode:(3 6)

load 0x40100000  len 612  room 16
tail 4
chksum 0x12
load 0x3ffe8000  len 788  room 4
tail 0
chksum 0x50
load 0x3ffe8314  len 264  room 8
tail 0
chksum 0x4a
csum 0x4a

2nd boot version : 1.1
  SPI Speed      : 80MHz
  SPI Mode       :   SPI Flash Size : 4Mbit
jump to run user1

Fatal exception (0):
epc1=0x401001a2  epc2=0x00000000  epc3=0x00000000  excvaddr=0x00000000  depc=0x00000000
Fatal exception (0):
epc1=0x401001a2  epc2=0x00000000  epc3=0x00000000  excvaddr=0x00000000  depc=0x00000000
Fatal exception (0):
epc1=0x401001a2  epc2=0x00000000  epc3=0x00000000  excvaddr=0x00000000  depc=0x00000000
Fatal exception (0):
epc1=0x401001a2  epc2=0x00000000  epc3=0x00000000  excvaddr=0x00000000  depc=0x00000000
Fatal exception (0):
epc1=0x401001a2  epc2=0x00000000  epc3=0x00000000  excvaddr=0x00000000  depc=0x00000000


where the last two lines repeat forever:

Code: Select all

Fatal exception (0):
epc1=0x401001a2  epc2=0x00000000  epc3=0x00000000  excvaddr=0x00000000  depc=0x00000000


I would be interested if you have an obvious answer. I am also going to try to assemble a second board in case it is a board problem.

Who is online

Users browsing this forum: No registered users and 91 guests