3 Replies Latest reply on Jun 3, 2019 4:08 AM by MoTa_728816

    Change timer period while Timer is running.

    PaBr_3664931

      Hello All

       

      I am using timer component, while run time i want to change the timer period,

       

      and as per this https://community.cypress.com/docs/DOC-12263

       

      i wrote the code.

      timer clock is 10Khz 

      default period is 900 (90ms)

      i want to change it to 3000ms.

       

              Timer_Start();

              Timer_WritePeriod(30000);

              Timer_WriteCounter(0);

              isr_timer_StartEx(timer_int_handler);

       

      after this lines of code the timer interrupt is activated in isr i wrote code to reset PSOC device.

      the task is i had to reset the PSOC device whenever the timer count is completed and interrupted.

       

      the period of timer is user changeable.

       

      Is there any way to successfully do this.

       

      Thanks.