Copy SDRAM to flash and IAP memory reservation

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Copy SDRAM to flash and IAP memory reservation

ソリューションへジャンプ
1,897件の閲覧回数
hiephuynh
Contributor III

For IAP (In-app programming) to update firmware code to Flash Bank of a LPC43xx, do I need to write from SDRAM to SRAM to flash bank memory or can I just write from SDRAM->flash

Another question I have is in UM10503.pdf section "6.4.5.8 RAM used by IAP command handler", it looks like there's a requirement to reserve some RAM block for IAP commands.  What's the total size of memory application must reserve for IAP calls and is there some code example for this reservation for IAP? Appreciate your help.

0 件の賞賛
返信
1 解決策
1,599件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee
Thanks for your reply.
You can enlarge the size of the stack area via adapting the linker file, however I think the defaut size is large enough.
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x2000;
define symbol __ICFEDIT_size_heap__   = 0x2000;
/**** End of ICF editor section. ###ICF###*/
Have a great day,
TIC
 
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
8 返答(返信)
1,599件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee
Thank you for your interest in NXP Semiconductor products and 
the opportunity to serve you.
You should copy the data from SDRAM to SRAM before calling Copy RAM to Flash command.
About how much RAM area should be reserved when calling IAP commands, I think the section 6.4.5.8 RAM used by IAP command handler has illustrated it in details.
Have a great day,
TIC
 
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
0 件の賞賛
返信
1,599件の閲覧回数
hiephuynh
Contributor III

Hi Jeremy, for "set active boot bank" IAP command, the datasheet says we need to reserve 2208 Bytes in RAM.  So I need to reserve 2208 B + additional bytes for other IAP commands like erase/prepare, etc?

Thanks

0 件の賞賛
返信
1,599件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi HIEP HUYNH,

Thanks for your reply.

1) So I need to reserve 2208 B + additional bytes for other IAP commands like erase/prepare, etc?

     Yes, and 2456 B is the maximum size.
Have a great day,
TIC

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

0 件の賞賛
返信
1,598件の閲覧回数
hiephuynh
Contributor III

Ok thanks. In order to do "Set Active Boot Bank" command,  in .icf Linker file, do I specify like this below to reserve the top 2456 Bytes for IAP calls?

define symbol LOCAL_SRAM_start__ = 0x10080000;
define symbol LOCAL_SRAM_end__  = 0x10089667;

0 件の賞賛
返信
1,598件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee
Thanks for your reply.
In my opinion, It's not necessary to adapt the original linker file when calling the IAP commands.
Hope this is clear.

Have a great day,
TIC

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

0 件の賞賛
返信
1,599件の閲覧回数
hiephuynh
Contributor III

Hi, so how would I reserve 2208 Bytes for this "Set Active Boot Bank" IAP command?  I'm using IAR Workbench.

0 件の賞賛
返信
1,600件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee
Thanks for your reply.
You can enlarge the size of the stack area via adapting the linker file, however I think the defaut size is large enough.
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x2000;
define symbol __ICFEDIT_size_heap__   = 0x2000;
/**** End of ICF editor section. ###ICF###*/
Have a great day,
TIC
 
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
0 件の賞賛
返信
1,599件の閲覧回数
hiephuynh
Contributor III

My .icf has the same defines.  The "Set Active Boot Bank" command is also working for me now.  Thanks.

0 件の賞賛
返信