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) { }
解決済! 解決策の投稿を見る。
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
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
Thanks, Tom.
Indeed, I forgot the #s.
It's working now.