Nandulal Gavali

No Data on Port Pin

Discussion created by Nandulal Gavali on Jul 10, 2020
Latest reply on Jul 13, 2020 by Edward Karpicz

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.

Outcomes