New chip ESP8285

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
mad474
Posts: 60
Joined: Sun Dec 29, 2013 7:48 pm

Re: New chip ESP8285 (running MicroPython)

Post by mad474 » Wed Aug 31, 2016 9:27 am

Well, getting MicroPython to run on the ESP8285 (here the PSF-A85 ITEAD board) took about half an hour. Here's a procedure:

1. Prepare the board for flashing MicroPython
Wiring:

Code: Select all

connect
PIN3  (EN = Enable)    to     PIN23 (3V3)
PIN12 (GND)            to     GND
PIN15 (GPIO11 SPI_CS0) to     GND
PIN16 (GOIO6  SPI_CLK) to     PIN24 (RST = Reset)
PIN20 (GND)            to     GND
PIN21 (RX)             to     TX  of USB2Serial converter
PIN22 (TX)             to     RX  of USB2Serial converter
GND                    to     GND of USB2Serial converter
PIN23 (3V3)            to     Vcc (3.3V stable power supply)
2. Download a suitable MicroPython binary
I used yesterdays esp8266-20160830-v1.8.3-80-g1f61fe0.bin
Binaries are here: http://micropython.org/download/#esp8266

3. Upload the binary to the board
I used esptool.py (which can be found here https://github.com/themadinventor/esptool/)
(please note the "-fm dout" option).

Code: Select all

$ esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash -fm dout -fs 8m 0x00000 esp8266-20160830-v1.8.3-80-g1f61fe0.bin

esptool.py v1.2-dev
Connecting...
Running Cesanta flasher stub...
Flash params set to 0x0320
Writing 532480 @ 0x0... 532480 (100 %)
Wrote 532480 bytes at 0x0 in 47.2 seconds (90.2 kbit/s)...
Leaving...
$ 
4. Switch board to mode "boot from flash"
Switch PIN15 from low to high level (disconnect from GND and connect to 3V3) and reset the board.

5. Run MicroPython
Start your favourite terminal emulator and soft reset (Ctrl+D).

Code: Select all

$ picocom --baud 115200 /dev/ttyUSB0
...
                          ll��l쎌
                                   l�l����l�#4 ets_task(40100390, 3, 3fff6300, 4)
Performing initial setup
Traceback (most recent call last):
  File "_boot.py", line 11, in <module>
  File "inisetup.py", line 37, in setup
  File "inisetup.py", line 9, in wifi
OSError: can't set AP config
could not open file 'boot.py' for reading
could not open file 'main.py' for reading

MicroPython v1.8.3-80-g1f61fe0 on 2016-08-30; ESP module with ESP8266
Type "help()" for more information.
>>> 
\o/
Here's the video evidence:
Image
https://www.youtube.com/watch?v=uImWqKknDyA

Now someone will have to find out why initial setup is naggy ;)

User avatar
deshipu
Posts: 1348
Joined: Thu May 28, 2015 5:54 pm

Re: New chip ESP8285

Post by deshipu » Wed Aug 31, 2016 12:23 pm

Awesome!

I wonder how many pins you can use as GPIOs, considering it uses a dual-channel SPI for communication with flash -- perhaps you have two extra pins? And perhaps one of them is the RX of the second UART?

mad474
Posts: 60
Joined: Sun Dec 29, 2013 7:48 pm

Re: New chip ESP8285

Post by mad474 » Wed Aug 31, 2016 4:59 pm

I wonder how many pins you can use as GPIOs, considering it uses a dual-channel SPI for communication with flash -- perhaps you have two extra pins? And perhaps one of them is the RX of the second UART?
Here we have the Pin numbering table of the board:

Code: Select all

#    FKT        DESCR
--   ----       ---------------------
1    ANT        WiFi Antenna
2    ADC        ADC, input range: 0V-1V;
3    EN         Chip enable terminal
4    GPIO16     GPIO16
5    GPIO14     GPIO14; HSPI_CLK
6    GPIO12     GPIO12; HSPI_MISO
7    GPIO13     GPIO13; HSPI_MOSI; UART0_CTS
8    GPIO15     GPIO15; HSPI_CS; UART0_RTS
9    GPIO2      Also used as a programming flash UART1_TX;GPIO2
10   GPIO0      GPIO0; SPI_CS2
11   GPIO4      GPIO4
12   GND        GND
13   GPIO9      PIHD;HSPIHD;GPIO9
14   GPIO10     SPIWP;HSPIWP;GPIO10
15   GPIO11     SPI_CS0;GPIO11
16   GPIO6      SPI_CLK;GPIO6
17   GPIO7      SPI_MSIO;GPIO7
18   GPIO8      SPI_MOSI;GPIO8
19   GPIO5      GPIO5
20   GND        GND
21   RX         Also used as a programming flash UART Rx;GPIO3
22   TX         Also used as a programming flash UART Tx ;GPIO1;SPI_CS1
23   3V3        Power supply
24   RESET      External reset(low active) 
grabbed from https://www.itead.cc/wiki/PSF-A85. And of course the pin numbers of the board differ from the pin numbers of the mcu http://www.espressif.com/sites/default/ ... 160422.pdf :mrgreen:

mad474
Posts: 60
Joined: Sun Dec 29, 2013 7:48 pm

Re: New chip ESP8285 (running MicroPython)

Post by mad474 » Wed Aug 31, 2016 5:03 pm

Now someone will have to find out why initial setup is naggy
My fault. After doing

Code: Select all

$ esptool.py --port /dev/ttyUSB0 erase_flash
and reflashing firmware everything is working fine.

P.S. If I recall correctly, erasing flash before first firmware deployment threw an error ... exotic preconfigured baud rate? I recall trying several baud rates in picocom and only getting rubbish (no AT command shell, no lua shell, no debug infos).

mad474
Posts: 60
Joined: Sun Dec 29, 2013 7:48 pm

Re: New chip ESP8285

Post by mad474 » Wed Aug 31, 2016 7:35 pm

deshipu wrote: ... perhaps you have two extra pins? And perhaps one of them is the RX of the second UART?
Sorry for ignorance. I think I've got your question now (not so familiar with ESP-12 specialities ... more into ESP-01 use cases).

GPIO9 and GPIO10 seem to be free and unbound - e.g. I set them to a defined state, then ran flash io operations and checked their correct values afterwards. Is this a feasible test?

I don't think we'll find a 2nd RX though ;)

User avatar
deshipu
Posts: 1348
Joined: Thu May 28, 2015 5:54 pm

Re: New chip ESP8285

Post by deshipu » Wed Aug 31, 2016 7:58 pm

Ah, bummer, U1RXD is on the GPIO8 pin, which is also SD_D1. Too bad.

Christian Walther
Posts: 67
Joined: Fri Aug 19, 2016 11:55 am

Re: New chip ESP8285

Post by Christian Walther » Thu Sep 01, 2016 11:35 am

I got myself two of these cuties and from what I’ve tested so far (not much) they work just fine with MicroPython 1.8.3 (release).

It’s revision 1 of the board, without GPIO 9 & 10 broken out, but according to the author at least one of them works.

MoonHouseAaron
Posts: 1
Joined: Tue Nov 15, 2016 1:53 pm

Re: New chip ESP8285

Post by MoonHouseAaron » Tue Nov 15, 2016 2:01 pm

What UART USB adapter are you using? I have 3 different ones that I have been trying and every time, I receive this when trying to communicate with the board through esptool: "A fatal error occurred: Failed to connect to ESP8266". Are you wiring it up using resistors or capacitors? No matter what, I just can't seem to get past that message. I've been able to communicate with my esp-12's I have but these 8285 have been giving me problems. I've tried it on my mac and my linux box. Any info you can share with me would be awesome.

BobRyan
Posts: 3
Joined: Sun Nov 06, 2016 9:36 pm

Re: New chip ESP8285

Post by BobRyan » Wed Nov 16, 2016 5:12 am

MoonHouseAaron,

Make sure you're grounding GPIO15. Most (all?) of the esp8266 have this implemented and the 8285 may not.

torwag
Posts: 216
Joined: Fri Dec 13, 2013 9:25 am

Re: New chip ESP8285

Post by torwag » Thu Feb 02, 2017 8:43 am

Hi,

sorry for reanimation of this old thread. Could someone with a ESP8285 or even better a PSF-A85 from itead.cc comment on the problem I observed with the connection via serial to the REPL. Described here http://forum.micropython.org/viewtopic.php?f=16&t=2980.

I only receive garbage for any possible baud setting after a reset.

Futhermore, my procedure to flash the chip was different. After an evening of try and error, I figured out that I had to connect 3.3V GND, RX and TX (obviously) and then pull down GPIO 0 during a power cycle to enter flash-download mode.

After that flashing and verifying went ok. (using esptool with -fm dout). However, I can't get any meaningful output from the serial port. I read somewhere in a comment on the itead.cc side that the PSF-A85 board requires other baud settings then 115200 during flashing, since its clock speed is set differently. However, I can't find any more infos about this. I also tried flashing with different baud speeds and for sure erased the flash prior of flashing.

Would be glad if someone could confirm it is working or what to check.

Post Reply