Yes, I am using a mem file. I modified my mem file with range statements for each register I write to, but this did not solve the problem.
After much experimentation, (and frustration) I found that changing the instruction that puts the device in LIMP mode solves the problem. I don't know why it works, but here is the change:
Code:
; /* The MFD bits may only be written when the device is in limp mode MISCCR[LIMP] = 1 */; mcf5208_ptr->RCP.MISCCR = MCF5208_CLOCK_MISCCR_LIMP | MCF5208_CLOCK_MISCCR_LIMPDIV(2);;writemem.w 0xFC0A0010 0x1002 ; old instructionwritemem.w 0xFC0A0010 0x1010 ; new: write LIMP mode enable bit in high and low byte.
My ROM code doesn't seem to need this. When I use the writemem.w on other registers it works. Not sure what's going on.
- George