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.
已解决! 转到解答。
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
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