Erase SPI Flash

Dependencies:   SPI_IS25LQ032B mbed-os

Fork of ISSI_FLASH_Erase by Suraj Pal

main.cpp

Committer:
surajdagar
Date:
17 months ago
Revision:
0:9e7d8a79a29c

File content as of revision 0:9e7d8a79a29c:

#include "mbed.h"
#include "SPI_IS25LQ032B.h"
DigitalOut led(P1_5);
Serial uart(P1_2, P1_1);
SPI_IS25LQ032B spi(p20, p21, p19, p17);
main()
{   
    uart.baud(115200);
    uart.printf("spif test \n");
    
    while(1)
    {
        led = !led;
        wait(1);
        uart.printf("SPI Status:%d \n\r", spi.readStatus());
        spi.chipErase();
        uart.printf("spif Erased \n\r");
    }
}