Software Reset of MCF5234 not working

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Software Reset of MCF5234 not working

跳至解决方案
1,202 次查看
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,033 次查看
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,034 次查看
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,033 次查看
sirlenzelot
Contributor II

Thanks, Tom.

Indeed, I forgot the #s.

It's working now.

0 项奖励
回复