Using 2nd flexSPI (not boot device) to store NVM data

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

Using 2nd flexSPI (not boot device) to store NVM data

974 Views
nickwallis
Senior Contributor I

Hi,

Our custom target h/w has a 2nd serial flash connected to FLEXSPI2_A port, this is intended to be used for the storage of non volatile data. Note, this is NOT the same device that is used to boot the chip or XIP (which is connected to FLEXSPI_A)

Please can you point me at some SDK examples that support erase, program and read from FLEXSPI_2 in our application? I think it might be possible using AHB commands or IP commands, also there might be existing drivers for this?

thanks!

-Nick

Labels (1)
Tags (4)
0 Kudos
Reply
1 Reply

966 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hi Nick, 

The implementation that you are trying to achieve is possible. We don't have an example that demonstrates explicitly how to do this. This is because the projects that we provide within the SDK are limited to the hardware that is available in our EVK. Our evaluation board has only one external flash connected through the FlexSPI interface. However, we do provide an example that demonstrates how to use part of the external flash as NVM. This is a great starting point for your application. You will find the drivers and how to initialize the memory. You only need to adapt this project to your custom needs. For example, change FlexSPI to FlexSPI2, change the LUT, change the size of the memory, etc. Also, in the SDK example, we copy all the functions that interact with the external flash to the internal flash. This is done because you cannot write, erase and read the external flash while doing XiP. In your case, this won't be necessary since you will have two different memories connected through different FlexSPI interfaces. The name of the SDK example project is flexspi_nor_polling_transfer. 

Regards,
Victor 

0 Kudos
Reply