Control of a double atrial triple chamber cardiac pacemaker having a programmable fallback mode. The triple chamber pacemaker has a right atrial electrode and a left atrial electrode connected to the same atrial detection/stimulation circuit, as well as a ventricular electrode connected to a ventricular detection/stimulation circuit of the pacemaker. The fallback mode involves desynchronization of the ventricular stimulation from the detected atrial rhythm when the atrial rhythm is too rapid. The pacemaker also includes a fallup mode of pacing in which there is a progressive re-synchronization of ventricular stimulation to the atrial rhythm when the atrial rhythm falls to a less rapid rhythm. The triple chamber pacemaker senses a succession of signals at the atrial circuit, and in response to each detection of a signal, defines a masking period of inter-atrial propagation for not sensing signals at the atrial circuit, measures an interval of time separating two successive sensed signals, compares the measured time interval to a predetermined control value, and triggers the fallup mode of progressive re-synchronization when the measured time interval becomes greater than the control value.