Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mcux_snvs_rtc.h File Reference

Real-time clock control based on the MCUX IMX SNVS counter API. More...

#include <zephyr/device.h>

Go to the source code of this file.

Functions

int mcux_snvs_rtc_set (const struct device *dev, uint32_t ticks)
 Set the current counter value.
 

Detailed Description

Real-time clock control based on the MCUX IMX SNVS counter API.

The core Zephyr API to this device is as a counter.

Additional implementation details a user should take into account:

  • an optional SRTC can be enabled (default) with configuration options
  • the high power channel (id 0) is always available, the low power channel (id 1) is optional
  • the low power alarm can be used to assert a wake-up
  • the counter has a fixed 1Hz period

Function Documentation

◆ mcux_snvs_rtc_set()

int mcux_snvs_rtc_set ( const struct device * dev,
uint32_t ticks )

Set the current counter value.

As the counter advances at 1Hz this will usually be set to the current UNIX time stamp.

Parameters
devthe IMX SNVS RTC device pointer.
ticksthe new value of the internal counter
Return values
non-negativeon success