Internal Flash utilization for External Memory

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

Internal Flash utilization for External Memory

Jump to solution
3,047 Views
Dhaya
Contributor III

Hi,

    We are trying to utilize internal ROM Flash memory for the purpose of secondary memory (instead of EEPROM) in LPC 1768, LPC 55S16. Is it possible to utilize FLASH for secondary memory and if possible how we can use. Kindly guide us to achieve on this

0 Kudos
Reply
1 Solution
2,905 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

For Internal Flash, in fsl_iap, there is FLASH_Program(), we can use it to store date in run time.

Please execute FLASH_Erase() then  FLASH_Program()

fsl_iap doesn't work for external Flash. What external Flash interface? 

 

View solution in original post

11 Replies
2,695 Views
Dhaya
Contributor III

Currently we are analyzing of cycle of read/write on flash IAP. Can you tell about read/write life cycle of LPC55S16 flash

0 Kudos
Reply
3,025 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

I am not sure if I understand your question. Could you please be more specific?

Thanks,

Jun Zhang

0 Kudos
Reply
3,005 Views
Dhaya
Contributor III

Hi,

    We are try to store the calibration  data in internal memory. We using LPC55S16 hence there is no EEPROM. We need almost 300 Bytes of storage. Hence we reviewed some websites to store those data in internal memory.

https://mcuoneclipse.com/2014/05/31/configuration-data-using-the-internal-flash-instead-of-an-extern...

 

Here we reviewed that use Internal FLASH memory instead of EEPROM.

 

Kindly guide that how to use internal FLASH memory as EEROM storage

0 Kudos
Reply
3,000 Views
Dhaya
Contributor III

Also Kindly update how to Read and write Flash during run time. Or it makes some issues on controller / life time ,etc,.

0 Kudos
Reply
2,998 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Dhaya 

Under MCUXpresso SDK folder, there is demo code iap_flash. I suggest you referring it.

This demo code erases and programs a portion of on-chip flash memory. A message a printed on the UART terminal as various operations on flash memory are performed.

Hope this helps,

Jun Zhang

2,939 Views
Dhaya
Contributor III

Thanks for the support. I taken the driver file from fsl_iap.h and fsl_iap.h. I need to save a particular a data byte in internal Flash memory during run time and read data from this. But i could not able to find the difference. How i store data in run time and how to read in Flash. Also i didn't found any register to reconstruct it. hereby i attached images kindly guide to save external data

 

Dhaya_0-1679056307348.png

Dhaya_1-1679056457407.png

 

0 Kudos
Reply
2,906 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

For Internal Flash, in fsl_iap, there is FLASH_Program(), we can use it to store date in run time.

Please execute FLASH_Erase() then  FLASH_Program()

fsl_iap doesn't work for external Flash. What external Flash interface? 

 

2,696 Views
Dhaya
Contributor III
Hi @ZhangJennie,
Thanks for your support. As per the data, its works well. Thanks a lot
0 Kudos
Reply
2,899 Views
Dhaya
Contributor III

Thanks for your reply. Also kindly guide, how we can assign address for the respective data since the program memory may take that address. How we can set the range for program memory?

0 Kudos
Reply
2,891 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Please take a look at the Flash program and erase functions. the second parameter is the destination address you want to handle with.

2,900 Views
Dhaya
Contributor III

No, we are using internal Flash only

0 Kudos
Reply