Cant get REPL on ESP8285

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
Dejnol
Posts: 3
Joined: Tue Nov 19, 2019 4:44 pm

Cant get REPL on ESP8285

Post by Dejnol » Tue Nov 19, 2019 5:02 pm

Hello!
My company is manufacturing device which is on market right now.
It is embedded with ESP8285 chip which is used with AT command firmware only right now. Each ESP is programmed on production.
For R&D action we would like to use MicroPython interpreter on ESP8285, but we could not get to the REPL stage.
We are programming with esptool and DOUT flash config.
We have experience with uploading MicroPython on ESP8266 so we know the process. We have succesfully used ESP8266 boards with MicroPython on the other RD project.

Now to the problem:
After Upload try on ESP8285 we reboot it and we get failed boot logs:

Code: Select all

17:38:47.694>  ets Jan  8 2013,rst cause:2, boot mode:(3,7)
17:38:47.694> 
17:38:47.694> load 0x40100000, len 31100, room 16 
17:38:47.769> tail 12
17:38:47.769> chksum 0xe3
17:38:47.769> ho 0 tail 12 room 4
17:38:47.769> load 0x3ffe8000, len 1084, room 12 
17:38:47.769> tail 0
17:38:47.769> chksum 0xc0
17:38:47.769> load 0x3ffe8440, len 3248, room 8 
17:38:47.769> tail 8
17:38:47.769> chksum 0xe1
17:38:47.769> csum 0xe1
17:38:47.769> #0 ets_task(40209c10, 31, 3ffe9100, 4)
17:38:47.968> #1 ets_task(4021e1ec, 32, 3ffeab80, 34)
17:38:47.968> #2 ets_task(4021d224, 20, 3ffea900, 3)
17:38:47.968> rf cal sector: 251
17:38:47.968> rf[112] : 00
17:38:47.968> rf[113] : 00
17:38:47.968> rf[114] : 01
17:38:47.968> 
17:38:47.968> SDK ver: 2.0.0(5a875ba) compiled @ Aug  9 2016 15:12:27
17:38:47.968> phy ver: 1055, pp ver: 10.2
17:38:47.968> 
17:38:47.968> mode : softAP(62:01:94:d7:1a:62)
17:38:47.968> add if1
17:38:47.968> #3 ets_task(4020edc0, 29, 3fff9150, 1é)ׇŇŰXE˘@Ť@ŤTgÍ%@NáCĆ‹^ËHĆ‹ÜA͢dζĆ<0>CĆ‹^ËHĆ‹ÜA͢dζĆ<0>HĐ!ŚŘQˆRhK		W
…É%-A-1%l)1‹bâ)Q®Yčz‡čb˛«ď fđ)Y*Ř@¨~‹ęA*!Q+ţôy«8ˇ=ˇ
Do You maybe have any idea what could be wrong? Any help will be appreciated.
We have tried
-many copies of the device
-few microPython firmware versions (from latest to 1.8.7)

Device seems to behave always the same. Rubbish near the end is sometimes different, but I don't think it matters.
But we are able to upload espressif AT firmware on device with no problem (We use ESP8285 DOWNLOAD TOOL from Espressif)

I am eager to hear from You!

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Cant get REPL on ESP8285

Post by Roberthh » Tue Nov 19, 2019 5:14 pm

The rubbish at the end could be data sent at a different baud rate. can you determine it?
At which baud rate is the initial part running?

Dejnol
Posts: 3
Joined: Tue Nov 19, 2019 4:44 pm

Re: Cant get REPL on ESP8285

Post by Dejnol » Wed Nov 20, 2019 7:05 am

Hello Roberthh, thanks for Your answer.
I have tried all "standard" baud rates. Rubbish on the end is not human-readable in any of them.
Ahh, and I have told my team that we should make this "Proof of Concept" using MicroPython, because it will be fast and easy... :)

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Cant get REPL on ESP8285

Post by Roberthh » Wed Nov 20, 2019 7:12 am

Can you hook up a logic analyzer or Oscilloscope to determine a possible baud rate. It may not be a standard one.
The standard ESP8266 for instance starts at a speed of 74880 baud, just to switch then to 115200 baud with the start of Micropython.
With Windows/Putty, you can set non-standard baud rates. So you could try the baud rate of start_baud_rate * 1.536

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Cant get REPL on ESP8285

Post by pythoncoder » Wed Nov 20, 2019 9:00 am

Have you used the --verify option on esptool? I have programmed ESP8285's with the following:

Code: Select all

esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --verify --flash_size=detect -fm dout 0 build/firmware-combined.bin
but other (older?) chips required

Code: Select all

esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --verify --flash_size=8m -fm qio 0 build/firmware-combined.bin
Finding the right invocation line is a bit of a black art.
Peter Hinch
Index to my micropython libraries.

Dejnol
Posts: 3
Joined: Tue Nov 19, 2019 4:44 pm

Re: Cant get REPL on ESP8285

Post by Dejnol » Wed Nov 20, 2019 1:31 pm

Thank You both for Your responses.
I did not have to check baudrate of "rubbish" because we have managed to find a solution.
Our device has 40MHz crystal next to ESP8285. Our engenieer swapped it for 26MHz crystal and Firmware worked!

Little explanation:
When we were flashing ESP with official ESP8285 DOWNLOAD TOOL we have changed crystal freq and that is why AT command firmware worked fine.

Image

It seems that MicroPython binary has crystal freq set up at 26MHz and fixed and there is no way of changing that during upload (by esptool.py). Every try with uploading MicroPython with official tool failed.

So now to the question. Do You have any knowledge about MicroPython binaries with Crystal freq configred to 40MHz?
I would like to avoid compiling MicroPython by myself. :)

Best regards and thanks again for being our "rubber duck!" :)

Post Reply