Murat Cakmak

1050 EVK HyperFlash content mismatch for second write

Discussion created by Murat Cakmak on Apr 13, 2020
Latest reply on Apr 20, 2020 by Mark Butcher

Hi Everyone, 

 

I am working on 1050 EVK and using Hyperflash which is the default. 

If I run HyperFlash example from the SDK (boards\evkbimxrt1050\driver_examples\flexspi\hyper_flash\polling_transfer),

it works well which is great. 

 

The test sequence is like below; 

- Erase Flash

- Erase Sector

- Program the Page using the numbers from 1 to 255. 

- Compare the written content with the source.

 

So, if I put the above sequence into a loop, there is no problem, it works well. 

But if I will the input buffer with some magical numbers, for the first time, it works but after the second iteration, the content does not match. 

For example, filling the buffer with 0x12345678 (buffer_cast_to_32bit[0] = 0x12345678, buffer_cast_to_32bit[1] = 0x12345678 ...)

 

If I call "flexspi_nor_hyperflash_cfi(EXAMPLE_FLEXSPI);" function in the loop before erasing the flash, it does not make any difference but if I call the flexspi_hyper_flash_init() in the loop which called for each iteration, I can see the expected values in the flash. 

 

I assume there should be no need to call the flexspi_hyper_flash_init() before each writing operation, or is there any limitation in HyperFlash? I assume If I erase a sector, the second (or others) should not be a problem. 

 

Am I missing something? Or any idea?

 

Thank you.

Murat

Outcomes