How the Internal Serial bootloader of MPC5777M works

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

How the Internal Serial bootloader of MPC5777M works

2,514 Views
jordimoreno
Contributor II

I would like to know how the Internal Serial Bootloader works:

- Which is the computer front end to flash the device

- Which additional HW is required (MAX232...)

- It programs de Flash or the RAM? as User manual says:

The factory BAF code also runs the Serial Boot Loader, setting up pins on the device to
act as a UART: receiving a file using a defined format and transferring the program
portion of the file to RAM...

 

Thank you,

Jordi.

Labels (1)
0 Kudos
Reply
7 Replies

1,967 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

 

just notice that serial boot is invoked only if no valid boot header is found in flash. Once the application is programmed (and valid boot header is present in flash), it is not possible to run the serial boot again. The boot header would have to be invalidated by application.

pastedImage_1.png

If it is not suitable for you, it is necessary to use flash resident bootloader like this:

http://www.nxp.com/files/microcontrollers/doc/app_note/AN5319.pdf

http://www.nxp.com/files/microcontrollers/doc/app_note/AN5319SW.zip

 

Regards,

Lukas

0 Kudos
Reply

1,967 Views
jordimoreno
Contributor II

Thanks for your answer.

Is it possible to flash the a SW using RAppID BL Tool? MCU part No does not include MPC5777M but other versions of the MPC5xxx.

Best Regards,

Jordi.

0 Kudos
Reply

1,967 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Rappid BL for MPC57xx devices support only "RBF" - that means flash version. First, you have to load flash resident Rappid bootloader to flash using JTAG tool and then you can use Rappid interface to load an application. The reason for this solution is mentioned in my previous post - if valid boot header is present, BAF (serial boot) is not started.

This is different from MPC56xx devices - Rappid bootloader for MPC56xx can be used directly. BAM serial boot is used, so you don't need to use JTAG to load flash resident bootloader. The boot mode is controlled by pins, so the limitation mentioned above is not present on MPC56xx.

So, the answer to your question is no.

Regards,

Lukas

0 Kudos
Reply

1,967 Views
jordimoreno
Contributor II

Thank you Lukas,

But according what I understood from the RAppID userguide, it downloads a Flash bootloader in RAM which allows you to Flash the code.

The idea is to use RAppID with microcontrollers without a valid bootheader.Then, flash the application with RAppID, in case that application needs to be udated, send an specific command to the application which erases the bootheader and reset. Then the BAF (serial boot) is started and a new application can be flashed.

It does this work?

Thank you,

Jordi.

0 Kudos
Reply

1,969 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Jordi,

that's possible but you have to develop own bootloader.

You can read in user manual for Rappid bootloader that MPC56xx devices support RBA algorithm and MPC57xx RBF algorithm. In case of RBF, it is necessary to load the bootloader to flash using JTAG tool:

pastedImage_1.png

You can read this thread:

https://community.nxp.com/thread/320166#386416 

It describes how to create a RAM image which can be loaded to RAM by BAF/BAM.

Regards,

Lukas

1,969 Views
jordimoreno
Contributor II

Thank you very much for your support, now it is clear.

0 Kudos
Reply

1,967 Views
dmitriynechkin
Contributor I

Serial bootloader allow to load user program into internal SRAM, using LINFlexD or MCAN serial interface, then to execute that program. That program can then be used to control the download of data and erasing/programming of the internal or external flash memory. Protocol is the same as on older devices: Transfer valid PASSWORD -> transfer Start_ADR and SIZE -> transfer your code -> run code and do anything you want.

You can use any hardware you like, what supports LIN or CAN transfer. As i konw, the is no universal software to read/program through BOOT, but i know several companys who develop this sotware.

P.S. IF you try read out new BMW ECU - don't do it, you will dammage the unit

0 Kudos
Reply