1 Reply Latest reply on Feb 2, 2016 4:22 AM by user_1377889

    unconfigured tcpwm

    user_361485673

      Hi

         

      I used CY8C4014SXI

         

      I want to use unconfigured tcpwm for timer capture and pwm.

         

      I will use these separately.

         

      first of all I set the capture config like this. (my tcpwm component name is timer)

         

       

         

          /* Enable the global interrupt */
          CyGlobalIntEnable;       
          TC_CC_ISR_StartEx(InterruptHandler);  
             
          Timer_SetMode(Timer_MODE_TIMER_CAPTURE);
          Timer_SetCaptureMode(Timer_TRIG_FALLING);   
          Timer_SetPrescaler(Timer_PRESCALE_DIVBY1);
          Timer_SetCounterMode(Timer_COUNT_UP);  
          Timer_SetOneShot(0);
          Timer_SetInterruptMode(Timer_INTR_MASK_CC_MATCH);
          Timer_TriggerCommand(Timer_CAPTURE_MASK, Timer_CMD_CAPTURE);
         
          Timer_WritePeriod(65000);
          Timer_WriteCounter(0);
          Timer_WriteCompare(0);
         
          //Timer_Enable();     
          Timer_Init();  
          Timer_Start();

         

      but it is not working.

         

      What am I missing the config for timer capure?

         

       

         

      Thanks