MPC5606B is not booting from flash

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

MPC5606B is not booting from flash

Jump to solution
1,080 Views
dhineshramakris
Contributor I

Hi,

 

We have recently got a MPC5606B_trk board , and I have a application code compiled from codewarrier which meant to blink a LED. I am using RappId bootloader to flash the xxx.mot file to board. As soon as I flash it is started blinking the LED. When when I do the reset(power cycle) it is not running.

 

What could be the issue. ??

 

 

NOTE:

The code is built for FLASH.

 

Thanks,

Labels (1)
0 Kudos
1 Solution
843 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

I did quick test with your mot file and the result is that it is caused by SWT watchdog. I can see that F_SWT flag is set in RGM_DES register. If I attach debugger and stop execution before first watchdog time-out, debugger automatically disables the watchdog and when I run the code again, it works and the LED is blinking. If I don't do that, the device is periodically reset by SWT.

It is possible that you call DisableWatchdog() too late. Try to call it before all initialization. I'm not familiar with Rappid Init but I guess that it is possible to disable watchdog also in Rappid initialization. 

Regards,

Lukas

View solution in original post

0 Kudos
4 Replies
843 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

first thing that comes into my mind - have you disabled watchdog? Try to add this function to your project:

void DisableWatchdog(void)

{

    SWT.SR.R = 0x0000c520;     /* Write keys to clear soft lock bit */

    SWT.SR.R = 0x0000d928;

    SWT.CR.R = 0x8000010A;     /* Clear watchdog enable (WEN) */

}

Does it work now? If not, could you attach the *.mot file?

Regards,

Lukas

0 Kudos
843 Views
dhineshramakris
Contributor I

Hi Lukas,

Thanks for your response.

I tried add DisableWatchdog() and called inside main. But still didn't work.

Let me give some idea about what  i am doing..

i am just trying to run a simple LED app to get hands on MPC5606B. I used rappid init to gennerate the code and I configured only the GPIO pheripheral and GPIO interrupt. I Disabled everything else including watchdog .

I compiled the code in codewarrier and used Rappid bootloader to load the xxx.mot file into the Board. I am choosing default password in Rappid bootloader and didn't touch the password registers. It is fresh Board.

What I am facing:::

When I flash the code using the serial cable ,  as soon as the flashing is finished I am able to see the LED blinking . Now i changed the Boot jumbers to boot from the flash and resetted the Board. But It doesn't Boot now..  This is where I stuck.. Attaching the xx.mot file.

Thanks ,

Dhinesh R

0 Kudos
844 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

I did quick test with your mot file and the result is that it is caused by SWT watchdog. I can see that F_SWT flag is set in RGM_DES register. If I attach debugger and stop execution before first watchdog time-out, debugger automatically disables the watchdog and when I run the code again, it works and the LED is blinking. If I don't do that, the device is periodically reset by SWT.

It is possible that you call DisableWatchdog() too late. Try to call it before all initialization. I'm not familiar with Rappid Init but I guess that it is possible to disable watchdog also in Rappid initialization. 

Regards,

Lukas

0 Kudos
843 Views
dhineshramakris
Contributor I

Thanks Lukas,

That worked. Saved my day.

0 Kudos