An implantable heart stimulating device has an ECG sensing unit to receive heart potential signals from sensing electrodes at an electrode lead arranged in connection with a patients heart. The ECG sensing unit is provided with a programmable make-break threshold. The device further has a timer adapted to generate a make-break detection period, and a counter. The counter is adapted to count the number of times that the amplitude of the heart potential signal exceeds the programmable make-break threshold during the make-break detection period. When the number of times is higher than a predetermined value, the ECG obtained during the make-break detection period is stored in an ECG storage unit.