Problem with Illegal address reset routine - S12XEP100

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

Problem with Illegal address reset routine - S12XEP100

ソリューションへジャンプ
2,333件の閲覧回数
sep2kor
Contributor III

hello

 

I am having some problem in executing the reset routine in S12XEP100 target.

 

I have the below piece of code to execute an illegal address routine....but it seems to me that the code is not working properly.

 

( * ( Mcu_ByteRegisterPtrType ) ( ( 0x0 ) + ( 0x10 ) ) ) . UC = 0x60 ;
{
     __asm ( "GLDAB 0, X" ) ;
}

 

Can anyone help me?

ラベル(1)
1 解決策
1,629件の閲覧回数
mroczeks
Contributor IV

You can also try this way:

void Reset() {
    static dword val;
    val = *(dword * __far)0x00600000;
}

 

 

Hope it works for you :smileywink:

元の投稿で解決策を見る

4 返答(返信)
1,630件の閲覧回数
kef
Specialist I

1) Is MCU operating in single chip mode? As you may know, there are no illegal addresses in expanded modes.

2) Isn't memory protection unit (MPU) setup to trigger error on access to 0x600000'G? Try disabling MPU configuration steps and see if that makes ILAD reset working.

 

P.S. Are you using Codewarrior? This line should do the same what your code is doing

   if( *(volatile char * far)0x600000ul )  { }

0 件の賞賛
返信
1,630件の閲覧回数
mroczeks
Contributor IV

You can also try this way:

void Reset() {
    static dword val;
    val = *(dword * __far)0x00600000;
}

 

 

Hope it works for you :smileywink:

1,630件の閲覧回数
jsmcortina
Contributor III

Another technique to cause a reset is to enable COP and then sit in a busy loop without writing the flags. The COP will timeout and cause your desired reset.

 

James

0 件の賞賛
返信
1,630件の閲覧回数
sep2kor
Contributor III

thank you all.

 

the problem is fixed now.

 

0 件の賞賛
返信