A medical device system for controlling ventricular pacing therapy during cardiac resynchronization therapy that includes a sensing device to sense a cardiac signal and emit a trigger signal in response to the sensed cardiac signal, a therapy delivery device to deliver the ventricular pacing in response to the emitted trigger signal, and a processor configured to identify a fiducial point of the cardiac signal sensed in real-time, set a window comprising a start point positioned a first distance prior to the fiducial point and an endpoint positioned a second distance less than the first distance subsequent to the fiducial point, determine a signal characteristic of the cardiac signal within the window, determine whether a P-wave is detected in response to the signal characteristic, determine whether an atrio-ventricular interval timer has expired, and emit a trigger signal to deliver the ventricular pacing timed off of the local maximum in response to the P-wave being detected and not timed off of the local maximum in response to the timer being expired.