AnsweredAssumed Answered

S9S08SG16 ICS TPM error

Question asked by duffy tang on Oct 26, 2018
Latest reply on Oct 30, 2018 by vicentegomez

Hello,

        I use the 9S08SG16 and  only configured   ICS  TPM  GPIO to confirm my ICS .   

        But the output is different from what I expected.

        My code is very simple.      

       

        void Init_ICS(void)
           {
              ICSC1 = 0x04; 
             ICSC2 = 0x00; 
           }

 

         void Init_TPM1(void)
         {
             TPM1SC =0x4c; 
             TPM1CNTH =0; 
         }    

 

interrupt VectorNumber_Vtpm1ovf void TPM1_OVF_ISR(void)
{
if((TPM1SC & 0x80)==0x80)
{
TPM1SC_TOF = 0; //溢出标志位

IC1_Toogle;

}
}

 

 


   

Outcomes