In a heart stimulation device a mode of operation is switched in response
to detection of atrial tachyarrhythmia such as atrial fibrillation. The
stimulation device may initially operate in a normal mode of pacing then,
upon detection of atrial tachyarrhythmia, the stimulation device may
change how it senses signals and it may switch to another mode of pacing
at one or more sites in the ventricle.