Erase/Write operation using IAP commands is not working in the same bank

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

Erase/Write operation using IAP commands is not working in the same bank

1,052 Views
ponalagappan
Contributor III

I am trying to erase/write flash bank A sectors 9-14 of lpc18xx. My code resides inside sector 0-8. For using IAP commands in the below link is suggested to run IAP functions from RAM.

IAP write problem - using the same memory bank for bootloader and application 

I am not getting, how to use attributes to run these functions from RAM. I tried with 

__attribute__((section("RAM_func")))

but it is not working, i am missing something. i am not getting the correct steps?

Can anyone explain the steps. any link of example codes

Thanks

0 Kudos
2 Replies

531 Views
tdo
Contributor II

Hello

Based on the same link you provided, did you disabled all your interrupt (as the handler is in the same Flash Bank than the one you try to perform IAP action on)

'--------------'

I only had to prevent the firmware to be interrupted by the SysTick, because the IRQ handler is in flash.



That's the culprit!

No need to move the calling functions to RAM. IAP code is in ROM, which already avoids a conflict with flash.

'-------------'

0 Kudos

531 Views
jeremyzhou
NXP Employee
NXP Employee

Hi pon alagappan,

To provide the fastest possible support I want to point you to a similar question which has been answered on our NXP community.

Please refer to Relocating code from FLASH to RAM  to view the details.
Have a great day,
Ping

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

0 Kudos