Can you please elaborate more? Please tell us what is exactly the On time and OFF time you want to measure?
1. If you are using DeepSleep in your application, you can use WatchDogTimer to measure the times.
2. If you are not using Deep Sleep, you can use any of the timers TCPWM Timer/WatchDog timer/Systick timer to measure the times.
If you are using TCPWM timer, you can run the Timer in continuous mode and set the interrupt for terminal count and increment the variable inside Timer component isr.
Please refer code examples for Timer interrupt CE220169 TCPWM periodic interrupt in PSoC Creator.
Thanks and regards
I want to measure the capacitance charging and dis-charging time so that's why i need to detect the on time and off time in my timer
Can you please give more details of your implementation(if possible, kindly share the block diagram)?
Also, Can you please let us know when is Timer_ReadCapture being called?
This will help us to have a clearer view of the issue you are facing.
Thanks and Regards,