New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Report: Writing struct after Flash erase sector not working. #112
Comments
Hello ! SPIFlash Version: 3.0.0 The eraseChip function is working while the eraseSector function is not erasing at all
We should only see unwritten bytes with a value of 255 (in decimal output mode) |
…memory boundary - when rolling over from address '_chip.capacity' to address '0x00' - has been fixed. In previous versions this caused issues with writing complex data structures across the memory boundary and led to many _writeErrorCheck() failures. Fixes issue #112 --> A new function - 'flash.eraseSection(address, size)' - has been intrduced in this version. When a user requires a large and variable (between writes) amount of data to be written to the flash memory on the fly and to have the correct amount of space erased to fit the data, this function will automatically calculate and erase the right amount of space to fit the data. Please note that if the the amount of data being written is consistently the same size, the pre-existing 'flash.eraseSector()', 'flash.eraseBlock32K()' and 'flash.eraseBlock64K()' functions will operate a lot faster.
Hi guys, Thanks for pointing this out. I've fixed it (I think) in the latest code in the development branch. I've tested it using the new version of Struct_writer.ino in the Examples folder. 🙂 My apologies for the delay in getting back to you. I came back from a long bushwalking holiday to the start of semester at the University I work at - having 1200 first years to deal with after a month of the wilderness took a bit of getting back into! |
Hi,
SPIFlash Version: 3.0.1
Arduino IDE: 1.8.5
OS: Mac 10.13.3
Arduino Board: mega2560
Flash: Winbond: W25Q80BV 1MB
Before I write the struct to flash I do a flash.eraseSector() on page 0.
After check page 0 the values are not stored.
When I do the same with chip erase, all is fine. But I do not always want to delete the whole chip.
The struct:
Save and read :
The text was updated successfully, but these errors were encountered: