hrishie89
Newbie
Hello everyone. I've been trying to use external flash W25Q64FV integrating with EFR32MG21 micro-controller.
I am using this driver https://github.com/nimaltd/spif and below is the example code
SPIF_Init(&spif, &hspi1, SPI_CS_GPIO_Port, SPI_CS_Pin);
for(int i=0; i<256;i++){
testwrite=i+45;
}
SPIF_EraseSector(&spif, 0);
SPIF_WritePage(&spif, 0, testwrite, 256, 0);
SPIF_ReadPage(&spif, 0, testRead, 256, 0);
so in this example, I can see that i'm able to read the data which is already there on the flash at address 0;
i can erase that data too using eraseSector but when i try to write the data using WritePage , it is not writing anything, In readPage the values i get are 0xff;
same example with stm32 micro-controller is working fine can write ,read and erase.
I am using this driver https://github.com/nimaltd/spif and below is the example code
SPIF_Init(&spif, &hspi1, SPI_CS_GPIO_Port, SPI_CS_Pin);
for(int i=0; i<256;i++){
testwrite=i+45;
}
SPIF_EraseSector(&spif, 0);
SPIF_WritePage(&spif, 0, testwrite, 256, 0);
SPIF_ReadPage(&spif, 0, testRead, 256, 0);
so in this example, I can see that i'm able to read the data which is already there on the flash at address 0;
i can erase that data too using eraseSector but when i try to write the data using WritePage , it is not writing anything, In readPage the values i get are 0xff;
same example with stm32 micro-controller is working fine can write ,read and erase.