Software Reset of MCF5234 not working

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

Software Reset of MCF5234 not working

ソリューションへジャンプ
1,169件の閲覧回数
sirlenzelot
Contributor II

Hi All,

I am trying to soft-reset my MCF5234 with the following code, but nothing happens. The program just keeps looping and no reset is executed.

Does anyone encounter a similar problem?

Am I doing something wrong?

 

Thanks,

Dirk

 

asm("    MOVE $2700,SR");

asm("    MOVEA.L #$40110000,A0");

asm("    MOVE.B $C0,(A0)");

while (1) { }

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 解決策
1,000件の閲覧回数
TomE
Specialist II

Check the assembly syntax for your compiler.

I use gcc, and for it the assembly should be "MOVE #$2700, SR" and "MOVE.B #$C0, (A0)". Otherwise you're moving from memory location 0x2700 to the status register, and from memory location 0x00C0 to the Reset Control Register.

Read this one, there might be other problems with Soft Reset:

https://community.freescale.com/message/303708#303708

Tom

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,001件の閲覧回数
TomE
Specialist II

Check the assembly syntax for your compiler.

I use gcc, and for it the assembly should be "MOVE #$2700, SR" and "MOVE.B #$C0, (A0)". Otherwise you're moving from memory location 0x2700 to the status register, and from memory location 0x00C0 to the Reset Control Register.

Read this one, there might be other problems with Soft Reset:

https://community.freescale.com/message/303708#303708

Tom

0 件の賞賛
返信
1,000件の閲覧回数
sirlenzelot
Contributor II

Thanks, Tom.

Indeed, I forgot the #s.

It's working now.

0 件の賞賛
返信