TWR-K70F120M - use of Nandflash MT29F2G16

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

TWR-K70F120M - use of Nandflash MT29F2G16

Jump to solution
842 Views
arnogir
Senior Contributor II

Hello

I'm using the TWR-K70F120M which implement a Nandflash connected through the NFC port (Not FlexBus it seems to me)

My application can made more than 1Mbytes (because use some big picture to display on a TFT LCD)

Then what is the best way to extend the internal flash by using the external nandflash?

The ideal way for me would be that this is totally transparent. With the code relocation (#pragma define_section) and the linker file, I can place data (image) and / or the code at 0x6000 0000 or in internal flash (from 0x0000000).

Then I have a map file with some code/data from 0x0000 0000 and other from 0x6000 0000.

but after, how do to have the code execute it normally independently of used flash?

- And how progam the .afx (.bin, or.hex...) which contains data at 0x0000 0000 and 0x6000 0000 with the via the USB JTAG included in the tower and CW (v10.3)

- And then is Debug is possible?

Thank

0 Kudos
1 Solution
449 Views
arnogir
Senior Contributor II

Hi

PEG work with two different manner:

1- Generate the resource file to a cpp file which contain constant (represent picture), then use a global structure to access at all needed resources

2- Generate the resource file to a binary file. This file must be written somewhere in memory and then loaded by PEG by calling API LoadResourceFile in which I must indicate a path and a file name.

PEGBOOL PegResourceManager::LoadResourceFile(PegFile *pFile, PEGBOOL DelOldStrs)

Then for this solution, I think I need use the System File.




View solution in original post

0 Kudos
5 Replies
449 Views
philmac
Contributor I

The MQX 4.1 provides such driver as well as example for your reference, you may refer to "C:\Freescale\Freescale_MQX_4_1\ffs\examples\mfs_nandflash" for details.

Looking for this example of creating an file system in external Nandflash for MQX 4.0.   I don't see the \ffs\examples folder anywhere.?   Anyone know if it exists?

0 Kudos
449 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Arno Gir,

Actually Kinetis doesn't support executing code in nand flash, and no IDE supports downloading data directly into the nand flash, because it needs help from NFS driver and file system middleware in some cases. so in my opinion, you may put code in internal flash, and your code should include NFS driver and file system middleware, which can read and write data (image) in nand flash. The MQX 4.1 provides such driver as well as example for your reference, you may refer to "C:\Freescale\Freescale_MQX_4_1\ffs\examples\mfs_nandflash" for details.

Hope that helps,


Have a great day,
Kan

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

0 Kudos
449 Views
arnogir
Senior Contributor II

Hi,

Ok, I understand I must found a way to store Data (image in the flash).

I think no problem to read the flash at the beginning of my program to bring it into RAM without problem: I use PEG  lite. It seem I must use function "LoadBinaryRessourceFile" but I not found them in my PEG!...


After that I must found a simple way to load data in the nandflash!...


0 Kudos
449 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Arno Gir,

I think you may add USB MSD support in your application to copy image file from PC to the nand flash.


Have a great day,
Kan

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

0 Kudos
450 Views
arnogir
Senior Contributor II

Hi

PEG work with two different manner:

1- Generate the resource file to a cpp file which contain constant (represent picture), then use a global structure to access at all needed resources

2- Generate the resource file to a binary file. This file must be written somewhere in memory and then loaded by PEG by calling API LoadResourceFile in which I must indicate a path and a file name.

PEGBOOL PegResourceManager::LoadResourceFile(PegFile *pFile, PEGBOOL DelOldStrs)

Then for this solution, I think I need use the System File.




0 Kudos