Hi! I am trying to do a sector erase of the FX3 DVK's flash.
Having programmed the FX3 with USBFlashProg.img and setting the following parameters on Control center:
6. Erase SPI flash sector
bmRequestType = 0x40
bRequest = 0xC4
wValue = 0x0001
wIndex = SPI flash sector address (Each sector is assumed to be of 64 KB and the byte address is
computed by multiplying wIndex by 65536)
wLength = 0x0000
No data phase is associated with this command.
It fails to erase but actually it did correctly. How is it possible?
I didn't quite understand how to set the wIndex to erase the remaining 7 sectors neither.
Help me please 🙂
You should set the parameters as mentioned in the README file.
So, set "Bytes to Transfer" to 0
The wIndex value will select the "sector" to erase. SPI flashes are organized into sectors (typically of 256 bytes each). Any write or erase is done on sectors and the flash will commit your writes to memory after the PAGE PROGRAM or ERASE cycles. And this sector index is selected using the wIndex field. Read your flash's datasheet to know more.
i'm trying to erase/write a flash (N25Q128A by Micron) on a custom design board using Control Center. I've lost the USBFlashProg provided by Cypress i was working on... Could you please update it ?