start up code

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

start up code

2,332 Views
niuniu
Contributor I

Hello, I am using MPC5644. I'd like to ask that for a unique MCU(e.g. MPC5644) is there any guide or instruction from the manufacture that describing how we should designed the start up code? Such as the initialization sequence and how to use the assembly instructions? Currently I looked for reference mostly on the MCU user manual and the core manual. Where can I find the guide to help to make a start up code and then a bootloader? Thank you very much!

Labels (1)
0 Kudos
Reply
2 Replies

1,940 Views
niuniu
Contributor I

Hello, Lukas,

Thank you for your kindly support. I will try to solve my problem from your kindly answer. Have a nice day!

0 Kudos
Reply

1,940 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

 

You can take a look at this application note:

https://www.nxp.com/docs/en/application-note/AN4097.pdf

 

It’s written for MPC5674F but a lot of things are the same for MPC5644A.

 

Generally speaking, it is necessary to set RCHW and reset vector, initialize SRAM memory and then initialize C environment (set stack pointer, data pointers, copy initialization data). Optionally, you can configure other features like PLL, cache and so on but this can be done also in C code in main function.

 

Or, the easiest way is to use default startup files which are generated by CodeWarrior when creating new project.

 

Then see this draft of application note – it describes how to write bootloader and user application for MPC56xx devices:

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

It is written for MPC5634M which is very similar to MPC5644A.

 

And this is application note for MPC57xx (MPC5748G and UART) – it’s almost the same, just modified for MPC57xx:

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

0 Kudos
Reply