Is there any way to remove the interrupt handling in the IAP eeprom for LCP11XX

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

Is there any way to remove the interrupt handling in the IAP eeprom for LCP11XX

Jump to solution
1,624 Views
volkan_coskun
Contributor I

Hello!

I have been reading and scrutinizing the IAP eeprom library and found out that the interrupts has to be disabled and enabled during a read and write operation.

However, for my application, I have to enable the interrupts in order to receive other high priority interrupts, so I want to do it concurrently in the background.

Today, I can write to EEPROM but I am losing messages since I am removing the interrupts.

Here is a sample code of how I do it now:

iap_eeprom_write()
{

disable_int();

invoke_iap();

// enable interrupts
enable_int();
}

Back to the problem, is it possible to create a background interrupt handler using IAP_EEPROM and remove the disable/enable interrupt functionality?

I know that there are background callbacks that can be used to handle background operation with interrupt priorities in for example data flash reads and writes.

If not, is there any other alternative for eeprom library that can be used in order to run in the background.

I would be very glad if you could provide me with some help.

regards,

Volle

Labels (1)
0 Kudos
1 Solution
1,373 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Volkan Coskun,

Sorry for reply late.
I've attached an application note which describes the In-Application Programming capabilities of LPC11U6X, it suits LPC11E6X as well.
In the application, it provides guidance to interrupt handling during flash IAP calls. And in the attachment, it contains the demo code for referring to.

Have a great day,
TIC

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
5 Replies
1,373 Views
volkan_coskun
Contributor I

jeremyzhou

Ah ok I see.

Do you have any example code on how you move the interrupt vectors from the flash to the SRAM?

I have been trying to find example codes but have not found anything yet.

regards,

Volle

0 Kudos
1,374 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Volkan Coskun,

Sorry for reply late.
I've attached an application note which describes the In-Application Programming capabilities of LPC11U6X, it suits LPC11E6X as well.
In the application, it provides guidance to interrupt handling during flash IAP calls. And in the attachment, it contains the demo code for referring to.

Have a great day,
TIC

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,373 Views
volkan_coskun
Contributor I

jeremyzhou

I did some further investigation and saw that you could replace:

uint32_t command[5]; uint32_t result[5]; typedef void (*IAP)(uint32_t command[5], uint32_t result[5]); IAP *iap_entry = (IAP *)0x1FFF1FF1; … ((IAP)IAP_ENTRY)(command, result);

with:

#include "libeeprom.h" /* defines EELIB_entry */ IAP *iap_entry = (IAP *)EELIB_entry;

However, it seems that I am missing the test object "libeeprom-lpc11e68.a"  file for LPC11E68J which is used together with this library.

 

In LPC1347 EEPROM Source :

A testobject is provided here (lpcxx.a) that is used together with the libeeprom.h file.

Is there any way I can get hold of the .a file for this particular processor?

regards,

Volkan Coskun 

0 Kudos
1,373 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Volkan Coskun,

Thanks for your reply.
1) Is there any way I can get hold of the .a file for this particular processor?
--No, I'm afraid not.

Have a great day,
TIC

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
1,373 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Volkan Coskun,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
The on-chip flash memory and EEPROM are not accessible during erase/write operations. When the user application code starts executing, the interrupt vectors from the user flash area are active. Before making any IAP call, either disable the interrupts or ensure that the user interrupt vectors are active in RAM and that the interrupt handlers reside in RAM.
The LPC11Exx has the ability to remap the interrupt vector table to the RAM by changing the MAP bits in the SYSMEMREMAP register. This allows interrupts to occur even during the erase and write operations. But as the flash cannot be accessed during this time, the interrupt handlers must be executed from the RAM. Hence, all the code related to the interrupt handlers must be copied from flash into the RAM.

pastedImage_1.png

Have a great day,
TIC

 

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

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos