Methods of flash program

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Methods of flash program

713 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Albert on Mon Feb 21 06:10:28 MST 2011
[IMG]http://knowledgebase.nxp.com/images/icons/icon1.gif[/IMG] [B]JTAG, SWD e IAP - Program memory[/B]
        Hi all,

My doubts can be obvious for someone.

I have a little of doubts about the flash programing methods.

When I debug my code with JTAG or SWD these methods program the code in  the flash automatically, but how? They call the IAP command for do the  program?

IAP comand can just write and erase data in the flash, or it can program the code in the flash as ISP? What the function of IAP?

I read on a docment that if you put 0 on P0.22 after reset the ISP mode  is called and know as "first boot", but in the same condition the  processor can enter on IAP mode, which is know of "Second boot" . How  can I enter on the "second boot"?

Thanks.
0 项奖励
回复
1 回复

695 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Feb 21 06:53:30 MST 2011
IAP is "In Application Programming" and is a set of functions in ROM for your application to call, to read/write Flash.
ISP is "In System Programming" and is a boot mode that does not execute the code (your code) in Flash, but instead loads a program over one of the supported interfaces (UART, USB, etc depending on your chip) and programs the Flash
The Debugger uses its own mechanisms for programming the flash via the processors debug connection (JTAG/SWD).

When the processor comes out of reset, it always runs from code in ROM. This is the First Boot. The First Boot performas various configuration/setp operations, and then (depending on your pin configuration) either calls the ISP, or the code in Flash (providing the Flash checksum is correct).

If you have a debugger connected, the First Boot runs, and then the debugger takes over.

HTH
0 项奖励
回复