pvvx / esp8266web

Small web server on ESP8266
The Unlicense
245 stars 92 forks source link

Write to SPI memory locations ... #3

Open hdrut opened 9 years ago

hdrut commented 9 years ago

Hi pvvx

I want to say thank you for this great piece of work. It's awesome! ... but also it's complicated. Perhaps you can give me a hand, i want to write to SPI to save some data. I use spi_flash_erase and spi_flash_write but nothing gets written... Is there some protection in place?

Thks in advance,

Horacio

pvvx commented 8 years ago

No protection. spi_flash_write uses addresses from 0 to 16777216. spi_flash_erase_sector uses addresses in sectors. Sector = 4096 bytes. spi_flash_erase_block uses addresses in blocks. Blocks = 65536 bytes.

flashchip->chip_size - describes the max work address limit.