MPC 5644A Jump Instructions

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

MPC 5644A Jump Instructions

1,149 次查看
alessandrosirto
Contributor II

Hi Guys , 

First , thanks in advace for your attention. 

I have a little question. I 'm working on MPC5644A CPU . I have Inside the flash memory the bootloader and the application. I have decided to update application using the internal boot strategy mode. At now the CPU turn on always on in application state , and once the user decide go to bootloader. Is it possible start up always the application in bootloader and after some needed apllication control jump to application code with out any reset ?

At the moment I use flash like this 

0x00000000 - 0x00004000 application reset vector

0x00004000 - 0x00008000 booter reset vector

0x00100000 - 0x00180000 application code

0x00380000 - 0x00400000 bootloader code

regadrs ,

Ale

标记 (1)
2 回复数

1,063 次查看
alessandrosirto
Contributor II

Ok Lukas 

thanks for your advices!!!

Regards , 

0 项奖励
回复

1,063 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Ale,

more common solution is start bootloader after reset, the bootloader then makes a decision if bootloader or user application will be executed (based on state of a pin, some "key" in flash memory or whatever else). Reason - there's always a risk of unexpected reset or power down during the programming of user application. In this case, the bootloader is not affected and the application can be downloaded again. If the bootloader is called from application, there's no way to recover without JTAG.

Next advantage is that you can jump to the application from bootloader right after reset, so no initialization of the device is performed (or only minimalist initialization can be done which can be easily reverted back to default state).

This leading me to the next point - I always recommend to everyone to either jump to user application right after reset or (if jumping later from bootloader) put everything back to default reset state. This can save a lot of troubles.

Some resources which could help:

Draft of application note for MPC56xx:

https://community.nxp.com/servlet/JiveServlet/download/427962-1-279359/bootloader.zip

 

Updated and published version for MPC57xx devices:

http://www.nxp.com/assets/documents/data/en/application-notes/AN5319.pdf

http://www.nxp.com/assets/documents/data/en/application-notes-software/AN5319SW.zip

Regards,

Lukas