In some examples, a leadless pacing device (hereinafter, “LPD”) is configured for implantation in a ventricle of a heart of a patient, and is configured to switch between an atrio-ventricular synchronous pacing mode and an asynchronous ventricular pacing mode in response to detection of one or more sensing events, which may be, for example, undersensing events. In some examples, an LPD is configured to switch from a sensing without pacing mode to an atrio-ventricular synchronous pacing mode in response to determining, for a threshold number of cardiac cycles, a ventricular depolarization was not detected within a ventricular event detection window that begins at an atrial activation event.