How to erase multiple blocks by LUT command on RT1064

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to erase multiple blocks by LUT command on RT1064

ソリューションへジャンプ
1,538件の閲覧回数
rickyrocky
Contributor I

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.

Call this function several times for multi-erase.
0 件の賞賛
返信
1 解決策
1,486件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

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

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
1,479件の閲覧回数
jay_heng
NXP Employee
NXP Employee

Flash block can only be erased one by one. there is not multiple blocks erase command.

0 件の賞賛
返信
1,469件の閲覧回数
rickyrocky
Contributor I

Hi @jay_heng 

Thanks for your information.

0 件の賞賛
返信
1,500件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信
1,494件の閲覧回数
rickyrocky
Contributor I

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)
 
The "address" argument is operation sector address, and I can not see the sector number or sector size in this function. Therefore, ONE flexspi_nor_flash_erase_sector() call, ONE sector erase.
 
I want to erase multi-sector, could you tell me the detail?
0 件の賞賛
返信
1,487件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信