RT1050-EVKB use onboard QSPI flash for program code AND storage

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

RT1050-EVKB use onboard QSPI flash for program code AND storage

Jump to solution
800 Views
_bjs
Contributor III

Hello I have working external QSPI custom hardware board.
This QSPI is same as the RT1050-EVKB external flash : IS25WP064AJBLE.
The program works and QSPI works.

Now i want to store some variables in memory for persistent storage. 
How do i do this?

My idea is the following, the flash size is for example say 0x4000000 (is hyper flash size, but as example!), i use the range  0x4000000-0x1000 (0x3FFF000) for program memory and the 0x1000 sector for storage.

How can this be done? For example can i use it from the MCU settings and assume it is read/write-able?

_bjs_0-1658912390206.png

 

 

volatile uint32_t addr0 = 0x63FFF000;
char *a = (char*) addr0;
*a = 20;

 

I tried this, and i get SEGFAULT. (This would be Xecute In Place XIP, or 'memory mapped'?)


I have seen the example code FREERTOS Hello Flash Operation. 
This is using a function to 'Init nor flash'. However How can i Init nor flash, when i am already running QSPI, Maybe i can stop the Init? but i need a 'EXAMPLE_FLEXSPI' base argument, can i use the one from the Program code, which is hidden in DCD i think? how do i go about this?

I dont want RWW, just simple 1 memory QSPI, slow is fine, use the same Base argument from the XIP, how do i do this, i cannot find the XIP base FLEXSPI.

When i try any of the example flash operations i get the "kStatus_FLEXSPI_IpCommandSequenceError" error.

0 Kudos
Reply
1 Solution
789 Views
_bjs
Contributor III

I think problem is solved by following:
https://community.nxp.com/t5/i-MX-RT/RT1050-QSPI-Flash-Limitations/m-p/745409

Still testing and trying to implement in my main project, the example project given by community member venugopal_v is working correct!
Project : BEL2_flexspi_nor_polling_transfer

View solution in original post

2 Replies
785 Views
jeremyzhou
NXP Employee
NXP Employee

Great!

0 Kudos
Reply
790 Views
_bjs
Contributor III

I think problem is solved by following:
https://community.nxp.com/t5/i-MX-RT/RT1050-QSPI-Flash-Limitations/m-p/745409

Still testing and trying to implement in my main project, the example project given by community member venugopal_v is working correct!
Project : BEL2_flexspi_nor_polling_transfer