Chat freely about anything...

User avatar
By cal
#19007
Eyal wrote:

(*) slow flash shows as slow wakeup and very slow file access. One esp-12 was fast until a fw flash when it became slow, I still do not know what changed this but I assume some parameter or autodetect.


Just an idea. Can it have something todo with sio/dio/qio flash access? Knowing next to nothing about that
I got the impression that different modules support different modes.
Flash chips may support multiple. Esp8266 may be programmed which to support.
I would expect speed to be halved when using sio instead of dio.

Cal
User avatar
By Eyal
#19023 Some numbers regarding speed. Compiling the 10 modules of my application on the fast esp-07 (512KB) takes 1.083242s. On the esp-12 (4MB) it takes 5.664441s. Time measured with tmr.now(). Much more than twice the speed. More than even four times...

First line of init.lua on esp-07 at 0.278s, on esp-12 at 0.612s.
Total of all dofile("*.lc") calls in my app on esp-07 is 0.086s, on esp-12 0.603s. About 8 times slower.

This is very important, right now my app runs about 4 times faster on the esp-7, meaning the battery lasts 4 times longer (it wakes up once a minute to do its thing).

On the esp-12 file.format() takes 30s...
User avatar
By GeorgeIoak
#19038 I have another unanswered post where I asked about the effect of the external crystal used on these modules.

Can it have something todo with sio/dio/qio flash access?


That is the access mode to talk to the flash chip. They are single/double/ and quad so obviously if a flash chip that supports QIO is used that will increase the access to the flash.

I would also expect a difference in speed whether a 26MHz or 40MHz crystal is used but I can't seem to find details on how the external crystal is used. I know that it is used for setting internal clocks but I'm not sure if the CPU frequency is changed when the crystal frequency is changed or if the internal PLL always configures for 80MHz CPU speed independent of the external crystal used.
User avatar
By Eyal
#19041 In my case the esp-12 is detected as QIO by the flash utility. I do not know how to query the actual mode used by lua.

In an earlier firmware there was a bug that detected the esp-12 as having a 512KB flash.
Code: Select all> =node.flashsize()
524288
> =string.format("%x %x %x %x %x %x %x %x", node.info())
0 9 5 a05aa1 1640ef 200 0 2625a00
               EF4016 = WINBOND_NEX_W25Q32_V (4MB)
> =string.format("%d %d %d %d %d %d %d %d", node.info())
0 9 5 10508961 1458415 512 0 40000000

It was running fast, like my esp-07. But later (and now) I have
Code: Select all> =node.flashsize()
4194304
> =string.format("%x %x %x %x %x %x %x %x", node.info())
0 9 5 a05aa1 1640ef 1000 0 2625a00
> =string.format("%d %d %d %d %d %d %d %d", node.info())
0 9 5 10508961 1458415 4096 0 40000000

and it is slow.

So I suspect some autodetect sets a slow access mode. Maybe in the SDK itself.