Application Heartbeat Setup

The application heartbeat is a visual way to show the user whether the application is running or not. When the application is in a stable operating state, a heartbeat with a frequency of 60 bpm is displayed. When a problem is detected by the device, the heartbeat is accelerated and the correct status LED is set, indicating what the failure is.

As shown in Figure 1, the heartbeat LED is driven by TCA0, feeding two waveforms with different frequencies into to the CCL LUT0. The CCL will mix together the PWM signals to create a realistic heartbeat. The heartbeat is running core independently, and only if a change to the bpm is needed will the CPU update the TCA0 period buffer registers. The heartbeat will then continue with the new bpm configuration, without any need for further CPU execution.

The following will result in an increased bpm:
Figure 1. Application Heartbeat Overview