Software Reset of MCF5234 not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Software Reset of MCF5234 not working

Jump to solution
1,117 Views
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) { }

Labels (1)
Tags (2)
0 Kudos
Reply
1 Solution
948 Views
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

View solution in original post

0 Kudos
Reply
2 Replies
949 Views
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 Kudos
Reply
948 Views
sirlenzelot
Contributor II

Thanks, Tom.

Indeed, I forgot the #s.

It's working now.

0 Kudos
Reply