I thought that the brain, specifically the medulla in the lower brain stem, controls heatbeat. But according to what I am reading, heartbeat is caused by electrical impulses in the heart which cause the heart muscles to contract. What is the source flow of this electricity? Does it come from the medulla, or does the medulla only regulate the pulse when there is already a pulse? In the case of sudden cardiac arrest, defillibration is applied to the heart directly. Is there then a feedback from the heart to the medulla causing it to adjust its heatbeat commands? What exactly causes the electrical activity of the heart to become irregular? .