hyper flash cannot erase/program

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

hyper flash cannot erase/program

Jump to solution
1,781 Views
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.png

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

Jay_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.png

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

Jay_Lin_3-1704347804639.png

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

Jay_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?

 

 

 

Labels (1)
0 Kudos
Reply
1 Solution
1,759 Views
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

View solution in original post

0 Kudos
Reply
1 Reply
1,760 Views
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 Kudos
Reply