# How to write more than one page at once in Winbond W25Q32JV

I am using Eclipse IDE for firmware development. I am using Quectel MC60 module with Winbond W25Q32JV (4 MB memory). The thing is that I am able to read/write single page.

I am facing issue with multiple page writing at once. I have to write multiple pages at once since I had erased the sector (consists of 16 pages). Before writing one page, I had to erase 1 sector.

General algorithm for writing:

main()
{

// erase sector (16 pages)

}


I want to utilize memory pages for optimum performance. Any help will be appreciated.

My pseudocode is like this:

char buff[256];

sector_erase(0);   // erase first 16 pages

memset(buff,7,sizeof(buff));

{
write_enable();
page_program();
spi_write(addr,buff);    // write page one by one and hence increment the address
while(status_register);   // polling status register
}