hyper flash cannot erase/program

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

hyper flash cannot erase/program

跳至解决方案
1,817 次查看
Jay_Lin
Contributor I

Hi, the flash I use is S26KS256S. I use the upper half of the flash memory space for the second bootloader (0x60000000~0x60040000) and the remaining space for my applications.

I referred to the AN12604 manual, transplanted the "polling_transfer" example in the SDK "SDK_2_14_0_EVKB-IMXRT1050", transplanted the hyperflash operation related functions into my software and placed it in SRAM.

When I used debug to check the action of the second bootloader operating hyperflash, I discovered a strange phenomenon.

1) If I use free run, the program will crash when executing flexspi_nor_flash_erase_sector; after pausing debugging, the program will get stuck in the MCUboot.

Jay_Lin_0-1704347452823.pngJay_Lin_0-1704347452823.png

------------------------------------------------------------------------------------------

Jay_Lin_1-1704347578429.pngJay_Lin_1-1704347578429.png

------------------------------------------------------------------------------------------

 

2)If I add a breakpoint in the flexspi_nor_flash_erase_sector function, the flash erase operation can be completed successfully and the program can continue execution.

Jay_Lin_2-1704347765422.pngJay_Lin_2-1704347765422.png

------------------------------------------------------------------------------------------

Jay_Lin_3-1704347804639.pngJay_Lin_3-1704347804639.png

------------------------------------------------------------------------------------------

Jay_Lin_4-1704347832315.pngJay_Lin_4-1704347832315.png

How to solve this problem?

Is hyperflash can erase/program it self? Are there any examples that I can refer to?

 

 

 

标签 (1)
0 项奖励
回复
1 解答
1,795 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Jay_Lin ,

   Please note, the Hyperflash can't support the RWW function.

   So, your flash  operation API , eg, flexspi_nor_flash_erase_sector, program related flash file need to copy to the internal RAM.

  You can refer to project:

SDK_2_14_0_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\flexspi\hyper_flash\polling_transfer

  in the ld file, you can find, the flash file is copy to the internal RAM.

You also need to do it like that, then you should make it works.

 

Wish it helps you!

Best Regards,

kerry

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,796 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Jay_Lin ,

   Please note, the Hyperflash can't support the RWW function.

   So, your flash  operation API , eg, flexspi_nor_flash_erase_sector, program related flash file need to copy to the internal RAM.

  You can refer to project:

SDK_2_14_0_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\flexspi\hyper_flash\polling_transfer

  in the ld file, you can find, the flash file is copy to the internal RAM.

You also need to do it like that, then you should make it works.

 

Wish it helps you!

Best Regards,

kerry

0 项奖励
回复