In my code I need to write and read data from the flash, for example setting a flash area where to do it.
Are there any examples or applications ?
I need a simple code to insert in my project, thank you.
Luigi
Solved! Go to Solution.
Hi @LuigiV ,
Sure, in fact, you need the flash operation code, you can refer to the MIMXRT1010-EVK SDK demo:
SDK_2_15_0_EVK-MIMXRT1010\boards\evkmimxrt1010\driver_examples\flexspi\nor
You can download the SDK from this link:
https://mcuxpresso.nxp.com/en/builder?hw=EVK-MIMXRT1010
Please note, the FlexSPI related operation code need to copy to internal RAM when you do the flash operation, and the external flash can't support the RWW function.
Wish it helps you!
If you still have question about it, please kindly let me know.
If your question is solved, please help me to mark the correct answer, just to close this case.
Any new issues, welcome to create the new question post, thanks.
Best Regards,
Kerry
Thanks Kerry,
I just tryed using the "flash_component" example, inserting the example code in my code; all was compiled and linked ...no errors, but when I run it an error appears and all crashes...
Compiling the "flash_component" example alone, it works good...
I'll try with the new example,
SDK_2_15_0_EVKMIMXRT1010\boards\evkmimxrt1010\driver_examples\flexspi\nor,
but what is the right way to insert the example code in my code to avoid any errors ?
What about using a LPSPI flash instead the Flexspi ?
Luigi
Hi @LuigiV ,
Do you also run the :
SDK_2_15_000_EVK-MIMXRT1010\boards\evkmimxrt1010\driver_examples\flexspi\nor\polling_transfer
in the MIMXRT1010-EVK board?
I run it, this works OK, this is the test result:
You mentioned, you have issues, do you use the NXP MIMXRT1010-EVK board?
Do you also work in the internal boot mode?
Please double check it again, as my side, works OK, even I downloaded to the flash, then run it directly without the debugger, also works OK
Wish it helps you!
Best Regards,
Kerry
Hi Kerry, thank you,
I use the NXP MIMXRT1010-EVK board and it works in the internal boot mode.
Not yet tested the "
SDK_2_15_000_EVK-MIMXRT1010\boards\evkmimxrt1010\driver_examples\flexspi\nor\polling_transfer
in the MIMXRT1010-EVK board"..
What I tested was the "component_examples-->flash_component" from SDK examples; this example works good but if I insert the example code in my project, the part of code I need, an error appears when I run the executable code, even if the compiling and linking don't show any errors.
What I'm searching is a simple code to insert in my project code that was able to write data to the "Flash" and read data from the "Flash", it doesn't care if the "Flash memory" is connected to the Flexspi or to the Lpspi interfaces.
Luigi
Hi @LuigiV ,
OK, understand your situation.
Your problem is happening on your own project which merge the project together.
Now, please let the FlexSPI related code copy to RAM, you can check this one:
This will help you copy some file to the internal RAM, as the external flash can't support the RWW.
You can understand it, you need to copy the flexspi operation code to the internal RAM.
Wish it helps you!
If you still have question about it, please kindly let me know.
Best Regards,
kerry
Thank you again Kerry,
I'll try it...
Luigi
Hi @LuigiV ,
You are always welcome!
Any issue, just kindly let me know.
If your question is solved, please also help me to mark the correct answer, just to close this case, thanks.
Any new issues, welcome to create the new question post.
Best Regards,
Kerry
I've inserted the linkscripts directory, but I get an error ---> the SRAM isn't sufficient...
Luigi
Hi @LuigiV ,
Your result mentioned, your ITCM is overflow.
You can define some of your RAM code to the DTCM, OCRAM, I mean, your used data in your code, set the location to the OCRAM, or DTCM, that still large.
Or, you also can reallocate the flexram, let the ITCM larger.
Wish it helps you!
Best Regards,
Kerry
Ok,
thank you