SLAAEN0 September   2024 MSPM0L1227 , MSPM0L1228 , MSPM0L1228-Q1 , MSPM0L2227 , MSPM0L2228 , MSPM0L2228-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Low-Frequency Subsystem Introduction
    1. 2.1 Resetting LFSS IP Using VBAT
    2. 2.2 Power Domain Supply Detection
      1. 2.2.1 Start-Up Sequences
      2. 2.2.2 LFSS IP Behavior
    3. 2.3 LFXT, LFOSC
    4. 2.4 Independent Watchdog Timer (IWDT)
    5. 2.5 Tamper I/O
      1. 2.5.1 IOMUX Mode
      2. 2.5.2 Tamper Mode
        1. 2.5.2.1 Tamper Event Detection
        2. 2.5.2.2 Timestamp Event Output
        3. 2.5.2.3 Heatbeat Generator
    6. 2.6 Scatchpad Memory (SPM)
    7. 2.7 Real-Time Clock (RTC)
    8. 2.8 VBAT Charging Mode
  6. 3Application Examples
    1. 3.1 Tamper I/O Heartbeat Example
    2. 3.2 RTC Tamper I/O Timestamp Event Example
    3. 3.3 Supercapacitor Charging Example
    4. 3.4 LFOSC Transition Back to LFXT Example
    5. 3.5 RTC_A Calibration
      1. 3.5.1 Peripheral ADC 12
      2. 3.5.2 RTC_A

Tamper I/O Heartbeat Example

This example shows off the Heartbeat generator still functioning when the main supply VDD experiences power loss. This example represents a real-world example such as an alarm system that was previously set when VDD was still powered and is still functioning after VDD power is lost. For this example to function correctly, power on the VBAT domain with a cell battery or an external power supply. Configure the Tamper I/O PA7 as output to drive the LED. After the setup, run the example code to toggle the corresponding LED PB2. By disconnecting the main power supply, VDD, the LED continues flashing as long as VBAT domain is powered.

#include "ti_msp_dl_config.h"

#define DELAY (16000000)

int main(void)
{
    /* Initialization */
    SYSCFG_DL_init();
    while (1) {
        delay_cycles(DELAY);
        DL_GPIO_togglePins(GPIO_LEDS_USER_LED2_PORT,
           GPIO_LEDS_USER_LED2_PIN |GPIO_LEDS_USER_TEST_PIN);
    }

    return 0;
}