cancel
Showing results for 
Search instead for 
Did you mean: 

QSPI Erase block erases the whole memory?

kvm16309876
Associate

I am using STM32L4 discovery board and External QSPI to save data. From the datasheet, it is mentioned that before every write, erase command has to be issued. But when I issue Erase Block or Subblock command, complete Chip is getting erased. Can anybody help me with this issue on how to erase a block of the memory?

2 REPLIES 2
Panometric
Associate III

Just guessing without more details like the part datasheet and logic analyzer capture, but QSPI commands can have a different width than the bulk transfer, perhaps you are using the wrong width and it being mis-interpretted. Look for sCommand.AddressMode=QSPI_ADDRESS_1_LINE

Andreas Bolsch
Lead II

Either you sent erase (sub-) sector commands for each sector or you sent a mass erase command instead of a (sub-) sector erase command.