Apply PWM signal to PIN of a Microcontroller
There is a missing bracket between the while and else in your code, and an extra one at the end. 

Here, like this:

unsigned int result;
unsigned int pwmSignal()
{
    If(PTDD_PTDD0) // to check for the incoming PWM signal.
    {
        PTDD_PTDD2 = 1;  //light up LED. 
        do // check Channel for 300ms.
        { 
           //my understanding is to latch the values of the channel value registers to the 
           //expected pin.
           result = TPM2C0VH;
           result &lt;&lt;=8;
           result = result + TPM2C0VL;
           result = PTAD_PTAD4;
           result = PTAD_PTAD5;
        } while (TPM2C0_CH0F == 0)

     } // here, this one is missing.
     else PTDD_PTDD2 = 0;
 }
 // }
 // ^ This one you added at the end isn't necessary.


It helps a lot if your code is indented correctly. I'm very surprised your compiler didn't complain about this.