BAM (Boot Assist Module) issue on MPC5554

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

BAM (Boot Assist Module) issue on MPC5554

4,646 Views
Thalpha
Contributor I
Hello,
 
I am trying to use BAM for MPC5554 on a application built MPC board. I am trying to load an flash boot loader into RAM, then use it to load my application into the flash. If I load the FBL via JTAG/Nexus it works perfectly. If I use BAM (via CAN), I manage to download the toolbox(FBL) into RAM, but when the toolbox is executed (I toggle a pin, so I know for sure that it is executed) I get ErrorFrames on CAN and after some time the controller is reset. I have no clue why. :smileysad:
 
I know it is very unlikely that someone would know exactly what my problem is, that is why I am asking if anyone knows where I could find some examples/instruction/advices on how to use BAM on a MPC55xx controller. (I have the controller user manual, so that won't help me to much) Of course, some code would be nice, if possible :smileyhappy: Maybe someone run into this kind of a problem before.
 
Thank you in advance,
0 Kudos
Reply
8 Replies

1,892 Views
admin
Specialist II

Hello:

I am trying to use the BAM module in MPC5634, right now I can download the code into the RAM, however, the code is not executed.

I use the CodeWarrior to write program code, and compile the program in CodeWarrior, the compilation result is a Motorola type S record file.

In the S record file, I found the program start point address is different with the first address the code stored in the RAM (the BAM should branch to that address after all code is downloaded), is that the reason the code is not execued?

Does anyone have this kind of experience? Or have a successful example?

 

Thank you!

 

superthh@hotmail.com

0 Kudos
Reply

1,892 Views
andre_mocci
Contributor I

Hi superthh,

 I use GHS Multi IDE to generate a .bin file; maybe, take a look on the .prm file to check memory sections used by CW.

 

Regards,

 

Andrea

 


0 Kudos
Reply

1,892 Views
admin
Specialist II

Hi, Ziomocci:

Thank you for your suggestion.

I checked the memory section in the map file complied from the project, and found that:

"_start()" code is set at 0x400050cb, and this code is the entry poin of initialization, it will call other initialization codes, for example, initialize the e200z335 and call "main()". Those initialization codes called by "_start()" are stored from 0x40000000 to 0x400050ca,

The BAM will branch to 0x40000000 when it finished the download. So this can't work? any suggestion about this?

 

Thank you!

 


ziomocci wrote:

Hi superthh,

 I use GHS Multi IDE to generate a .bin file; maybe, take a look on the .prm file to check memory sections used by CW.

 

Regards,

 

Andrea

 



 

0 Kudos
Reply

1,892 Views
andre_mocci
Contributor I

Well, I do not know what you wish do with your firmware downloaded via BAM; in my case, FW is very very simple because it contains just driver CAN, driver flash and a state machine to catch and process CAN messages sent from an external application, developed by myself using Visual C++  6.0. When it starts  run, I send CAN messages _using a Kvaser USBIICAN box_  which contains actual firmware to be programmed in flash memory (eg, I can send a boot.bin to be flashed from 0x0000_0000 to 0x_0003_0000, or an main_app.bin to be flashed from 0x0004_0000 to 0x0009_0000, take these values just an example).
In a poor words, I use BAM program to send a sort of bootloader to be programmed in RAM, then it start and with this bootloader I am able to erase, program and read flash memory.
It seems strange for me that _start() is set @0x400050cb and not @40000000; have you checked the .prm memory map file used by Codewarrior? I have never used it for PPC copntrollers, just for 8-bit secundary controller, but I think that the way to handle memory it is the same.

Attached snapshot shows what I do with BAM.

let me note if you need information sent, but as noted above, first I check the correctness of the file. prm

0 Kudos
Reply

1,892 Views
admin
Specialist II

Hi, Ziomocci:

My code download to BAM just a test program, and it will set two GPIO pins of MPC5634 high voltage.

Yes, I changed some linker configuration in CW to make the "main()" as entry poin when I complie the project.

Right now, my test code starts run.:smileyhappy:

 

Thank you for your kindly help!! 

0 Kudos
Reply

1,892 Views
andre_mocci
Contributor I

Hi Thalpha...

 

 I am trying to download via CAN my user code into an MPC5534EVB (enaugh similar to MPC5554EVB) using a little app developed with KVaser SDK; I am finding few problems; first of all I am not very sure that switch configuration is correctly [RSTCFG=1, BOOTCFG0=0, BOOTCFG1=1, PLLCFG0=0, PLLCFG1=0, WKPCFG=0] for serial mode activation, and on the other hand I have not find a relationship between baud rate (working at 8MHz it should be 200Kbaud) and bit time settings (tseg1,  tseg2, etc...) of CAN specifications.

I think instead that pairs baudrate:bit_time_cfg shall be used to communicate via FlexCAN.

 

Have you found any solution?

 

Thank you in advance

 

Andrea Mocci,

 

SW developer @ Akhela s.r.l. Cagliari, Italy

0 Kudos
Reply

1,891 Views
jonr
Contributor III

Does anyone know of PC software to download firmware via BAM?   Thanks.

0 Kudos
Reply

1,892 Views
andre_mocci
Contributor I

Hi everybody,

 You can use CAPL language with Vector CANalyzer, CANoe, etc, etc; also Omnitracer allows you to create script to download firmware via BAM; personally, two years ago I developed  a visual studio application, but you need a KVaser USBIICAN hw to use it.

 

Regards,

 

Andrea

0 Kudos
Reply