I´m trying to change the openProg sw and refactor WriteM25Pxx method. My aim
is clear memory only from 0 sector to 14 sector and hold 15 sector. How i can
change next code, for something similar that let me erase this sectors. I
think that i have to include "Sector erase" instruction but i don´t know how.
Is it necessary to erase a sector before writing? Regular 25xx memories don't
require erase, in this case the easiest thing to do is to add a device with a
size corresponding to 14 sectors.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I´m trying to change the openProg sw and refactor WriteM25Pxx method. My aim
is clear memory only from 0 sector to 14 sector and hold 15 sector. How i can
change next code, for something similar that let me erase this sectors. I
think that i have to include "Sector erase" instruction but i don´t know how.
bufferU=EXT_PORT; //CS=0
bufferU=0;
bufferU=0;
bufferU=SPI_WRITE; //Clear memory
bufferU=1;
bufferU=0xC7;
bufferU=EXT_PORT; //CS=1
bufferU=CS;
bufferU=0;
Is it necessary to erase a sector before writing? Regular 25xx memories don't
require erase, in this case the easiest thing to do is to add a device with a
size corresponding to 14 sectors.