Microchip® Advanced Software Framework

Quick start guide for RTC32 driver

This is the quick start guide for the RTC32 driver, with step-by-step instructions on how to configure and use the drivers in a selection of use cases.

The use cases contain several code fragments. The code fragments in the steps for setup can be copied into a custom initialization function, while the steps for usage can be copied into, e.g., the main application function.

Basic use case

Setup steps

Example code

Add to the initialization code:

Workflow

  1. Ensure that conf_rtc.h is present for the driver.
    • Note
      This configuration file is used by the driver and should not be included by the user.
  2. Initialize system clock:
  3. Call RTC32 driver's own init function to initialize the 32kHz oscillator and RTC32:

Usage steps

Example code

Add to, e.g., main loop in application C-file:

Workflow

  1. Get current time of the RTC32:

Advanced use cases

For more advanced use of the RTC32 driver, see the following use cases: