AnsweredAssumed Answered

MPC5605B will SS but not Go

Question asked by R Murray on Aug 14, 2012
Latest reply on Aug 15, 2012 by R Murray

I'm using the PE Multilink Universal JTAG'd to my MPC5605B target.  The CW is 5.9.0/3510.  Flash starting address for Main is 0x2000.


I couldn't seem to single step my code reliably so I striped down to just these few lines that I built using the CW wizard.



#include "MPC5605B.h"

int main(void)

{volatile int i = 0;

ME.RUNPC[1].R = 0x00000018; // Perif active in RUN0 or DRUN mode

ME.PCTL[68].R = 0x01;                // MPC56xxB/S SIU: select ME.RUNPC[1]

SIU.PCR[87].R = 0x0200;            // MPC56xxB: Initialize PF7 as output

SIU.GPDO[87].R = 0x0;                // turn on low true diag LED drive

for (;:smileywink: { i++;}                                    /* Loop forever */



If I set a break point at SIU.PCR[87].R = 0x0200, and single step from there, the write to GPDO[87] works, the output goes low, and all is well.  But, if I set the breakpoint beyond that point or just try to Go from reset with no break point, the variable counts but the I/O is not driven. I had been putting the processor in RUN0 mode, but I would often lose the debug control.


Why do I have to single step this to make it work?