-
Notifications
You must be signed in to change notification settings - Fork 14
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
Sector delete of sectors 0a and 0b fails #26
Comments
Thanks for the report. |
My solution came from page 13 section 6.9 of the manual at |
I tried and failed miserably :)
|
Your library works well, thanks. This is my analysis on sector erase in the AT45DB161E manual: 0a (all PAn bits = 0) 0b (bit PA3 =1) I have found no other issues implementing it on the AT45DB161E. |
Yes sure. That'd be cool. |
I found the E chip had an extended byte, so modified dataflash.cpp to grab the value.
|
Thanks! I found those docs about D/E differences: |
Very useful.
|
I am using an AT45DB161E.
After reviewing the manual I can not find any significant difference to the AT45DB161D
Sector erase works correctly with blocks 1 to 15 and not with sectors 0a and 0b.
The issue seems to originate in sectorErase
In the documentation, the E chip sector erase appears functionally the same to the D chip,
The AT45_SECTOR_0A/0B section appears to yield the correct values of 32 and 0, but allocates them to the wrong sector. Sector -1 shoud be 0 and sector 0, 32.
My replacement line "if(sector == AT45_SECTOR_0A) SPI.transfer(0x00); else SPI.transfer(32)" fixes the issue.
Here is my flash_SectorErase:
David
The text was updated successfully, but these errors were encountered: