-->
Page 1 of 3

Difficulty self-flashing the '8285

PostPosted: Sat Aug 27, 2016 3:33 pm
by cnlohr
I'm not sure what's up with it, but I use a flash re-writer to self-program USB and Wifi. It works on ESP8266's and it almost works on the '8285's, but... When I flash, it burns to the area above 512k. Then, it verifies the MD5Sum of the data. This all works, but, when it copies into the main bank, everything falls apart.

https://github.com/cnlohr/esp82xx/blob/ ... rewriter.c

Any ideas?

Re: Difficulty self-flashing the '8285

PostPosted: Sun Aug 28, 2016 12:00 am
by cnlohr
Ok. This is getting weird.

If I try reading the data first into a buffer on the stack, i.e. spi_flash_write/SPIRead/ets_memcpy( buf, (uint8_t*)0x40200000 + from1, SRCSIZE ); -- then SPIErase/spi_erase_sector it, then it freezes on the erase.

Maybe there's some status I need to check? hmm.

This does not appear to be the case with '86's.

Re: Difficulty self-flashing the '8285

PostPosted: Sun Aug 28, 2016 12:42 am
by forlotto
Would it matter if it were setup DIO mode ...

There was a fella saying that he could use GPIO 9 and 10 for relay function on the 8285 I thought those SD2 and SD3 were only available with DIO mod removing QIO functionality ...

Just a thought and are you sure it is not a 1MB flash?
The user claims it is: viewtopic.php?f=45&t=11371&start=4

Maybe you are not using this module?
https://www.itead.cc/wiki/PSF-A85

Have not used it personally just trying to help out here by pointing out some possibility.

Re: Difficulty self-flashing the '8285

PostPosted: Sun Aug 28, 2016 12:59 am
by cnlohr
ESP8285 uses a DOUT mode internal flash at 1MB. I'm using my own devboard (as I usually do). No functionality problems that I can see /except/ when it is flashing itself. I did now notice I can put in some Wait_SPI_Idle(flashchip)'s and it will freeze even on them!

https://github.com/esp8266/Arduino/issues/1844 suggests it may be a different cap configuration issue. I will try that now. Nope. P.S. Parallel discussion in: https://github.com/cnlohr/esp82xx/issues/31