johns wrote:Yes, I'm using the flash address not the irom address.
To be 100% clear: If my irom is at (eg) 0x40240000 and I do:
spi_flash_write(0x40000, ...)
This function will fail and trigger a watchdog reset.
nb. I can write to other areas of the flash, no problem. It's only address from 0x40000 and upwards that fail.
ISTR that there is some function to disable the caching/access to the flash for program code, so that a program can actually write to it. Of course, all the code accessing/writing the flash then has to be in RAM (or at a totally different location in flash). After all, when you write the flash you don't want it to be interrupted by read accesses for program code. However, i forgot where i saw that piece of code...
Greetings,
Chris