When to initialize hyperram for application ?

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

When to initialize hyperram for application ?

867 Views
rans
Senior Contributor I

Hello,

I will please start from our final goal and than reach the question on title:

We need to initialize hyperram (initialized with flashspi) and use it in application, just like a ram (with global variables, if needed).

I am familiar with NXP hyperram example (https://www.nxp.com/docs/en/nxp/application-notes/AN12239.pdf ) , but I am not sure about the following:

If we use this example, and initialize hyperram at start of application, doesn't it mean that we can't use global variables for example with the same application because hyperram was not initialized before application started ?

Since I am not sure about the above, I thought that maybe it is better to initialize hyperram in our bootloader and the jump to our main application. I assume that then we can access hyperram just like a regular ram and also use globals.

But here comes in the 2nd doubt/question:

Is it that a call to ResetISR() at the start of application and also the initialization done at the start of main() (such as BOARD_ConfigMPU, BOARD_InitPins, BOARD_BootClockRUN, BOARD_InitDebugConsole, BOARD_InitModuleClock(); ) 

shall result in reseting the hyperram initialization ( flexspi) or will it survive the jump from bootloader to application ?

Thank you,

ranran

0 Kudos
1 Reply

628 Views
art
NXP Employee
NXP Employee

Do you mean the unmodified AN12239 software example application? If so, please note that, actually, the code of this application actually runs from the processor's internal Instruction Tight Coupled Memory (ITCM) and the application data are stored into the processor's internal Data Tight Coupled Memory (DTCM). None of the above is ever placed into the HyperRAM. The purpose of this application is to only demonstrate the HyperRAM initialization and read/write process.

In general, there is no guarantee that running the code and storing the application data (variables) in the same HyperRAM chip is ever possible since the concurrent command fetch and data store operations can cause the FlexSPI controller's bus conflict.


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos