MPC5644A BAM bootloader limitations

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

MPC5644A BAM bootloader limitations

851 Views
alessandrocorti
Contributor II

Hello all,

I'm trying to use the CAN BAM bootloader on a MPC5644A target.

I'm able to download a simple test program to the RAM using the BAM via CAN, then I try to make this program more powerful and more complex (also bigger dimension), that I can run it correctly in RAM downloading it by the multilink interface but when I download the same code throught the BAM, the program doesn't work, the code download end correctly, it seems to me that the BAM passes the control to my code and then nothing more happens, it seems that the microcontroller is freezed. Are there some code size limitation on the code I download to RAM by the BAM?(Can I use all 192 Kbytes of RAM?)

Are there some other limitations am I missing?

I'm using CodeWarrior 10.7.

Thanks and best regards.

0 Kudos
4 Replies

644 Views
alessandrocorti
Contributor II

Hi Lukas, 

thank you for your reply.

The code I must download should be maximum 80 Kbytes, so no problems for the dimensions.

I disable the core watchdog as one of the first operations on my code.

Regarding the point number 2, what do you mean with SRAM initialization? How this initialization should be done and where? have you some code example / application note for this?

Regarding the point number 4, I did not undestand, the entry point of the image (where the BAM should jump at the end of image download), it is sended to the BAM with the 0x12 id CAN message at the beginning of the download procedure and is the same the compiler generate on the bin file as the very first line of compiled code, for my code it is the start of RAM, 0x40000000, is this correct?

Thank you.

Regards.

0 Kudos

644 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

Sram initialization:

pastedImage_1.png

Start address of image and entry point must be the same. Take a look at this post, I described how to create the RAM image:

https://community.nxp.com/thread/320166#comment-384300 

Regards,

Lukas

0 Kudos

644 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

some hints from my side:

1. Max size of RAM image should be RAM_SIZE - 16bytes. That means last 16bytes should not be written by BAM. Users usually use small images, so this is not problem.

2. Be aware that SRAM is initialized by BAM when writing the image. If you want to use RAM memory outside of this image, it must be initialized explicitly by your code.

3. Core watchdog is running when your application starts. You need to refresh it or disable it.

4. And make sure the entry point of your image is the first address of image.

Regards,

Lukas

0 Kudos

644 Views
petervlna
NXP TechSupport
NXP TechSupport

Hi,

there are no limitation according to my knowledge.

I expect the issue is that your code in RAM is lost on reset, which you do not trigger with debugger.

Is your code in micro when you attach with debugger, but the code was loaded via serial interface? Check RAM with debugger (with attach without reset).

I don't think so.

regards,

Peter

0 Kudos