7 Replies Latest reply on Mar 11, 2016 11:03 AM by user_1377889

    how can I start timer2 when timer1 reaches TC?

    davidjamesriding_1592196

      Hi guys,
      Simple question sorry, but I am trying to start a second timer from the CC output of the first.

         

      Psoc4100, TCPWM v2.10

      TCPWM1 setup:
      TC mode.
      All 3 ip's tied together:
      Reload (Rising Edge)
      Start (Falling Edge)
      Stop (Rising Edge)
      Counter mode: Up
      Run mode: Continuous
      Capture/Compare: Capture
      Interrupt on Terminal Count.
      Period: 10000
      IP Clock: 1khz
      The CC output is wired to Timer2: Start,Stop,Reload pins, ties togther aswell. 
      Note: This timer runs ok, and generates a nice interrupt to turn an beeper on after 10 secs.

         

       

         

      Timer2 setup:
      TC mode. Same as above.
      All 3 ip's tied together:
      Reload (Falling Edge)
      Start (Rising Edge)
      Stop (Falling Edge)
      Counter mode: Up
      Run mode: Continuous
      Capture/Compare: Capture
      Interrupt on Terminal Count.
      Period: 5000
      IP Clock: 1khz
      Note: This timer does NOT run ok, the interrupt (to turn the beeper off after 5 secs) never occurs.

         

      Things I have tried without success:
      a) Wire timer1 interrupt op to the timer 2 start ip. This flagged a routing error.  

         

      b) Starting timer 2 with API call:
      timer2_TriggerCommand(timer2_MASK,timer_door_alarm_timout_CMD_START);
      but this didn't work, ie. didn't start the timer. No interrupt generated after 5 secs.

      I've attached the project zipped.
      Any advice would be appreciated.
      Thanks,
      David