Chat freely about anything...

User avatar
By GeorgeIoak
#19048 I know that in the Winbond W25Q32FV flash chip there are commands to enter QPI mode "Enter QPI (38h)" so I'm sure there's a way to check what modes the flash supports. I've noticed these setting in the flash utility but I don't know if you manually change them if they will auto adjust. I know with the NodeMCU utility it defaults to 40MHz and DIO mode yet the crystal on my ESP-12 module i a 26MHz and leaving these settings alone I am able to reprogram.

I just looked it up and when a Device ID command is issued (9Fh), the chip will respond with 4016h for SPI mode and 6016h for QPI mode. By default the factory sets these so during the initial probe of the chip it should use this response to set the mode of communication. I haven't bothered to hook up the logic analyzer and check this although that might be an interesting thing to do one day.
User avatar
By Eyal
#19987 Should I start a new thread titled something like "flash speed"?

I am still dealing with the slow esp-12. I now tested an esp-12e which shows identical numbers (it does have extra pins which is of no interest to me ATM).

I want to understand how flash access is set up.

- Is it set at manufacturing?
Possible, but the fact that I had a case where one esp-12 changed from fast to slow with newer fw suggests this is not the case. Maybe it is set in flash (which is initially read using the most conservative way) and is then set for later access mode?

- Is it set in the fw itself at build time?
Unlikely as I flash the exact same fw and get different results.

- Is is set at flash time?
Possible, but I think esptool is doing a dumb upload.

- Is it set at run time by the SDK?
My main guess so far.

- Is it set at run time by the lua fw?
Possible but I suspect it works at a higher level.

Finally, I wonder if I should flash a 4MB module differently than a 512KB? I now use the same addresses: 0x00000, 0x10000, 0x7c000, 0x7e000.

cheers
User avatar
By cal
#19992
Eyal wrote:
Finally, I wonder if I should flash a 4MB module differently than a 512KB? I now use the same addresses: 0x00000, 0x10000, 0x7c000, 0x7e000.

cheers


Moin Eyal,

I remember to have read somewhere that the last 2 addresses depend on the flash size.
That may depend on how the firmware is built.
Doesn't the sdk 1.1.0 have different files in directory ld for different flash sizes?
Doesn't esptool.py do some flash size checking and doing different things then?
There is a thread about an alternative bootloader that may have hints.

Random thoughts,
Cal
User avatar
By Eyal
#19999
sdk 1.1.0

I am on the nodemcu fw which is based on 0.9.5. The v1 (now v1.1.1) is so far unusable as my application does not fit.
When I tried to flash a v1.0 fw to the addresses based on the flash size (somewhere towards the end of flash) it did not boot. I probably needed to tweak the build.

Doesn't esptool.py do some flash size checking

Don't know, but I know that I have to specify exactly where each part goes and it never objected or corrected me. An alternative GUI flasher I tried also requires me to set the location myself. Then again I may have missed something.