Hi All, and @victorjimenez
I am using evkmimxrt1064_fsl_romapi example.
romapi does not support erase block, so I intend to do it via LUT command.
Result is, just ONE block is erased. Could you tell me how to define to erase multiple blocks? (there is no parameter to specify block size or block num)
Solution:
In flexspi_nor_polling_transfer example, refer to flexspi_nor_flash_erase_sector() function.
Solved! Go to Solution.
Hi @rickyrocky ,
The example call erase_sector function by
status = flexspi_nor_flash_erase_sector(EXAMPLE_FLEXSPI, (EXAMPLE_SECTOR + j) * SECTOR_SIZE);
EXAMPLE_SECTOR is the start sector. You can replace it with your start block. If you want to erase several block, just call your flexspi_nor_flash_erase_block several times. That's it.
Regards,
Jing
Flash block can only be erased one by one. there is not multiple blocks erase command.
Hi @jay_heng
Thanks for your information.
Hi @rickyrocky ,
You can refer to the flexspi_mor_polling_transfer example. Add block erase command to LUT and refer to the flexspi_nor_flash_erase_sector() function.
Regards,
Jing
Hi @jingpan
Thanks for your reply soon.
I had also referred to flexspi_nor_polling_transfer example before, but it does not solve my issue.
status_t flexspi_nor_flash_erase_sector(FLEXSPI_Type *base, uint32_t address)
Hi @rickyrocky ,
The example call erase_sector function by
status = flexspi_nor_flash_erase_sector(EXAMPLE_FLEXSPI, (EXAMPLE_SECTOR + j) * SECTOR_SIZE);
EXAMPLE_SECTOR is the start sector. You can replace it with your start block. If you want to erase several block, just call your flexspi_nor_flash_erase_block several times. That's it.
Regards,
Jing