No Data on Port Pin

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

No Data on Port Pin

1,217 Views
nkgavali1
Contributor II

Hello,

I am using S12GA 48 pin micro for one application. I had used it earlier and have a confidence into it. 

I have followed same circuit for BDM and RESET. RESET is working fine and pull up to 5V correctly. 

The BDM pullup is 2.2k and RESET pull up is 10K.

Now, I wanted to toggle the pin with following  simple code,

void main(void)
{
MCU_init(); /* call Device Initialization */

HEARTBIT_LED = 1; // LED OFF Initially
while(1)
{
PTT = ~PTT;
for(i=0; i<60000; i++);
}

My LED is connected to port T. 

When I operate it in single stepping debug mode then it works fine. But when I run the code. Pin is not toggling. I even check with Timer ISR. but, same result.

All code is working fine and that I can see in debugger.

What could be the reason?

Note : I am using Codewarrior 5.2 and USBDM for the programming.

0 Kudos
Reply
1 Reply

1,183 Views
kef2
Senior Contributor V

Hi,

Would you mind posting compilable source next time? And since you didn't provide all must have's...

I guess you didn't single step all 60000 iterations of inner for loop? If i is defined as char, then it will never exit.

What exactly works while single stepping? Does LED toggle at least once? Did you initialize port direction register?

Edward

0 Kudos
Reply