MCF52259 Software Reset Problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MCF52259 Software Reset Problem

ソリューションへジャンプ
1,983件の閲覧回数
kdavis
Contributor III

I am using a MCF52259 with mqx 3.8.1. I am trying to use the reset control register to do a software reset, and when I do I get a some weird stack trace (below) and the processor locks up. Location 0x8 hex is the illegal instruction vector address, but I am not using interrupts for this program, and they are disabled. The code runs fine, until the reset where I get these problems.

 

This is the only code I have for the reset, and its all the manual shows that I should need.

MCF_RCM_RCR |= MCF_RCM_RCR_SOFTRST;

 

 

Thanks for any help you might be able to give,

Kevin

 

 

3 0x00000008 (0x00000008)()  0x00000008
2 0x20007FFC (0x20007FFC)()  0x20007ffc
1 _startup() startup.c:55 0x00000010
ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
1,703件の閲覧回数
butok
NXP Employee
NXP Employee

Hi,

For example, to reset MCF, I use the following code (from www.fnet.sf.net project):

fnet_mcf.c:

      void fnet_cpu_reset (void)

{

#if FNET_CFG_MCF_RCM           

     FNET_MCF_RCM_RCR = FNET_MCF_RCM_RCR_SOFTRST | FNET_MCF_RCM_RCR_FRCRSTOUT;

#else    

     unsigned long address = *((unsigned long *)(0x4));

      (( void(*)() )address)(); /* Jump. */

#endif

       }

Hope it will help,

Andrey Butok

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,703件の閲覧回数
kdavis
Contributor III

I did get it working they was Andrey suggested, but when using the RCR it would never succesfully restart

0 件の賞賛
返信
1,704件の閲覧回数
butok
NXP Employee
NXP Employee

Hi,

For example, to reset MCF, I use the following code (from www.fnet.sf.net project):

fnet_mcf.c:

      void fnet_cpu_reset (void)

{

#if FNET_CFG_MCF_RCM           

     FNET_MCF_RCM_RCR = FNET_MCF_RCM_RCR_SOFTRST | FNET_MCF_RCM_RCR_FRCRSTOUT;

#else    

     unsigned long address = *((unsigned long *)(0x4));

      (( void(*)() )address)(); /* Jump. */

#endif

       }

Hope it will help,

Andrey Butok

0 件の賞賛
返信
1,703件の閲覧回数
kdavis
Contributor III

I should say that there is a boot loader and an application  and I am trying to go back to the bootloader from the application by resetting the chip. So when I say I am not using interrupts I mean in the bootloader.

0 件の賞賛
返信