You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In MMAP mode we have only preconfigured read commands. To erase a sector, block etc. user must enter the Master mode and write a proper command. Using CSRs this procedure should look like this: spiflash_mmap_cfg_write(1); // switch to Master mode spiflash_mmap_master_cs_write(1); // CS on spiflash_mmap_master_phyconfig_write(0x010108); // xfer_len=8, xfer_width=1, xfer_mask=1 spiflash_mmap_master_rxtx_write(SECTOR_ERASE_CMD); // send erase command spiflash_mmap_master_cs_write(0); // CS off spiflash_mmap_cfg_write(0); // switch to MMAP mode
Function names are taken from genereated csr.h when you build Arty example.
edit: this is of course for offset 0x0, so to erase a particular data, there should be an address provided after the instruction byte.
The text was updated successfully, but these errors were encountered: