The use of the ESP8266 in the world of IoT

User avatar
By rab
#20458 No, I probably didn't mention undefining it, but I did try that. Having googled for it it seems to be a known limitation - many forum posts asking about it, no answers.

I've rewritten it in c, so pretty happy I know all that the code does (lots of pushing bits and some waiting for responses), but not much more about why it does it. Did you see the link to the memory map page on the wiki posted in the comments? It was updated 2 weeks ago with a bit of relevant information. Apparently the last parameter, which I had no idea what it does, selects the size of the flash read cache. In theory you can half the amount of cache to give more iram, but when I tried that out it wasn't successful.
User avatar
By cal
#20468 So I must have been lucky.

Regarding the cache size the author mentioned it in some compiler thread.

So you seem to have shared my fealings when after de-compiling that function into c it did not add much to
the understanding of its function.
I wonder if @pvvx got more insight in his try.

Cal
User avatar
By rab
#20474 I suppose there may not be much more we need to know on this one. Sure it'd be nice to know exactly what each bit pushed and returned means, but I suppose it doesn't really matter if we don't. We know the procedure required to set up the mapping and we know basically what the parameters to Cache_Read_Enable do (ok, I've not actually got the half cache option working myself). It may be that there aren't any more functions or options hidden in there for us to know about.
User avatar
By cal
#20477 I hoped to find an answer if it's possible to map the flash memory twice or parts of it differently.
The xtensa ISA mentions that memory may me mapped multiple times using different configurations.
The esp8266 firmware seems to configure all memory regions of cpu same for code and data in chunks of 0x20000000.
Accesses of flash as we use it follow "code" semantics meaning l32 instructions and alignment.
The cpu config does not explain that to me.
It would be nice if we could access flash with data semantics for simple byte access to store strings, etc.
I hoped to find some answer from de-compiling that function.

Cal