MCF51MM bootloader question

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

MCF51MM bootloader question

1,091 Views
robynyost
Contributor II

The MCF51MM has a USB bootloader in ROM.  We don't have a USB interface.  Most of the time, the firmware executes correctly but at times the code is not being executed.  I am wondering if I might be jumping into the bootloader instead.  Is there any way to tell the bootloader is running without a USB interface?  Are any  pins toggled or set that would provide an indication?

 

We have tried pulling up the BLMS pin.  I have the following set in my code:

 

UINT8 boot:0x0000040A = 0x00;   //zero out checksum to bypass boot loader

UINT8 boot2:0x0002040A = 0x00;

 

 


What about the signature SEMAPHORE?  How is that set when the code is not executing?

 

Any insight will be appreciated!

 

It is also possible the chip is in the halt mode.  Is there any way to tell if this is occurring?  If I attach the BDM and try to attach to the program, I get an error.  If I erase the flash and force the reset, the board always works.  I can't see what is happening when the code is not running.  I'm looking for any tricks or tips on how to determine what mode/state the chip is in when it is not running after POR.

Labels (1)
0 Kudos
1 Reply

890 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

I myself never implement a USB bootloader but I did several other MCU bootloaders.

from my understanding of your question, when your MCU running is standlaone mode, sometimes your application code can't run normal, seems like stuck in bootloader code. correct?

Normally when I implement bootloader, I will set up two leds in both bootloader code and app code to indicate me where the code is running currently. if only bootloader led on, thus we can confirm currently MCU is in bootloader mode.

normally the bootloader defines some conditions to allow code jump from bootloader codde to app code. if these conditions are not satisfied, bootloader can't jump to app mode. if it can't jump from bootloader to app successfully, you need have to check the bootloader code why those conditions are not meet.

when developing bootloader, if you want force bootloader jump to app, you can use "jmp" instruction to just to app entrance directly.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos