![]() |
MKMxxZxxACxx5 Bare Metal Software Drivers
R4.1.6
Reference Manual
|
This section describes functions and macros of the driver's API.
Macros | |
#define | IRTC_GetIsrFlag(flag) |
Returns state of IRTC interrupt pending flag. More... | |
#define | IRTC_ClrIsrFlag(mask) |
Clear IRTC pending interrupt flag(s). More... | |
#define | IRTC_DisableIsr(mask) |
Disables IRTC interrupt(s). More... | |
#define | IRTC_EnableIsr(mask) |
Enables selected IRTC interrupt(s). More... | |
#define | IRTC_SelRtcClkout(src) |
Selects clock source to be outputted from device for use outside RTC. More... | |
#define | IRTC_GetTamperLog(log) |
Fills IRTC Tamper Log Data Structure with current tamper event time stamp and status information. More... | |
#define | IRTC_SetTamperPinActiveLow(pin) |
Sets active low polarity for specified tamper pins. More... | |
#define | IRTC_SetTamperPinActiveHigh(pin) |
Sets active high polarity for specified tamper pins. More... | |
#define | IRTC_BootVLPR() |
Enables Boot into VLPR mode after POR. More... | |
#define | IRTC_BootRUN() |
Enables Boot into RUN mode after POR. More... | |
#define | IRTC_GetClock(ptr) |
Gets IRTC clock. More... | |
#define | IRTC_SetClock(ptr) |
Sets IRTC clock. More... | |
#define | IRTC_SetAlarm(match, time) |
Sets IRTC alarm and alarm match condition. More... | |
#define | IRTC_SetDST(hour_start, day_start, mon_start, hour_end, day_end, mon_end) |
Sets Daylight Saving Time (DST). More... | |
#define | IRTC_UpdateCoarseCompVal(interval, value) |
Updates coarse compensation value. More... | |
#define | IRTC_UpdateFineCompVal(integer, fraction) |
Updates fine compensation value. More... | |
#define | IRTC_WrRam(src, size) |
Writes data into 32-byte IRTC RAM. More... | |
#define | IRTC_RdRam(dst, size) |
Reads data from 32-byte IRTC RAM. More... | |
#define | IRTC_Hibernate(state) |
Places device into hibernation mode. More... | |
#define | IRTC_InstallCallback(ip, callback) |
Installs callback function for IRTC interrupt vector 41. More... | |
#define | IRTC_Init(irtc, t0, t1, t2, mask) |
Initializes IRTC module with WKUP/TAMPER0 pin assigned to tamper mode. More... | |
#define | IRTC_WkupInit(irtc, t1, t2, mask) |
Initializes IRTC module with WKUP/TAMPER0 pin assigned to hibernation mode. More... | |
#define IRTC_GetIsrFlag | ( | flag | ) |
This macro returns state of IRTC interrupt pending interrupt flag.
flag | Select one of the IRTC Interrupts. |
#define IRTC_ClrIsrFlag | ( | mask | ) |
This macro clears IRTC pending interrupt flag(s).
mask | Select one or more OR'ed IRTC Interrupts. |
#define IRTC_DisableIsr | ( | mask | ) |
This macro disables selected IRTC interrupt(s)
mask | Select one or more OR'ed IRTC Interrupts. |
#define IRTC_EnableIsr | ( | mask | ) |
This macro enables selected IRTC interrupt(s).
mask | Select one or more OR'ed IRTC Interrupts. |
#define IRTC_SelRtcClkout | ( | src | ) |
This macro selects clock source to be outputted from device for use outside RTC. Clock is routed to RTCCLKOUT pins and XBAR input[10].
src | Select one of the IRTC RTCCLKOUT Clock Sources. |
#define IRTC_GetTamperLog | ( | log | ) |
This macro will fills IRTC Tamper Log Data Structure with current time stamp and status information.
log | Pointer to IRTC Tamper Log Data Structure. |
#define IRTC_SetTamperPinActiveLow | ( | pin | ) |
This macro sets active low polarity for specified tamper pins.
pin | Select one of the IRTC Tamper Sources. |
#define IRTC_SetTamperPinActiveHigh | ( | pin | ) |
This macro sets active high polarity for specified tamper pins.
pin | Select one of the IRTC Tamper Sources. |
#define IRTC_BootVLPR | ( | ) |
This macro enables the VLPR Boot Mode after POR.
#define IRTC_BootRUN | ( | ) |
This macro enables the RUN Boot Mode after POR.
#define IRTC_GetClock | ( | ptr | ) |
This function reads date and time from IRTC module. Function updates the tTIME structure passed by pointer.
ptr | Pointer to the IRTC Time Data Structure. |
#define IRTC_SetClock | ( | ptr | ) |
This function sets date and time of the IRTC module. Function sets IRTC module with parameters from tTIME structure passed by pointer.
ptr | Pointer to the IRTC Time Data Structure. |
#define IRTC_SetAlarm | ( | match, | |
time | |||
) |
This function sets IRTC alarm and alarm match condition.
match | Select one of the IRTC Alarm Match Conditions. |
time | Pointer to the IRTC Alarm Data Structure. |
#define IRTC_SetDST | ( | hour_start, | |
day_start, | |||
mon_start, | |||
hour_end, | |||
day_end, | |||
mon_end | |||
) |
This function sets Daylight Saving Time (DST).
hour_start | Daylight Saving Time (DST) Hour Start Value. |
day_start | Daylight Saving Time (DST) Day Start Value. |
mon_start | Daylight Saving Time (DST) IRTC Months Start Value . |
hour_end | Daylight Saving Time (DST) Hour End Value. |
day_end | Daylight Saving Time (DST) Day End Value. |
mon_end | Daylight Saving Time (DST) IRTC Months End Value. |
#define IRTC_UpdateCoarseCompVal | ( | interval, | |
value | |||
) |
This function updates coarse compensation value.
interval | Compensation Interval is the duration in seconds over which the correction is applied. This is the time in which the addition or removal of 32.768 KHz clock cycles is done thereby ensuring that the compensation interval is close to the interval obtained with an ideal 1 Hz clock. Range of Compensation Interval: 1 second to 255 seconds. |
value | Compensation/Correction Value is a 2's complement format by which the 1 Hz Clock is modified by either adding or removing RTC Oscillator clock cycles. Range of Compensation: -128 to +127 (32.768 KHz clock cycles). |
#define IRTC_UpdateFineCompVal | ( | integer, | |
fraction | |||
) |
This function updates fine compensation value.
integer | Integral Compensation Value is a 2's complement value of the integer part of correction that has to be adjusted in every 1 second period. Range of Compensation: from -8 to +7 (32.768 KHz clock cycles). |
fraction | Fraction Compensation Value is the fractional part of the correction value that has to be adjusted. This value is expressed as number of clock cycles of a fixed 4.194304 MHz clock. Range of Compensation Interval: from 0 (0us delay) to 127 (30.279us delay). |
#define IRTC_WrRam | ( | src, | |
size | |||
) |
This macro writes data into 32-byte IRTC RAM.
src | Pointer to the uint8 array to be saved. |
size | Number of bytes in range from 1 to 32. |
#define IRTC_RdRam | ( | dst, | |
size | |||
) |
This macro reads data from 32-byte IRTC RAM.
dst | Pointer to the uint8 array to be read. |
size | Number of bytes in range from 1 to 32. |
#define IRTC_Hibernate | ( | state | ) |
This macro places device into hibernation mode by forcing TAMPER0 pin state from HiZ to either logic 0 or logic 1. The TAMPER0 pin is expected to control external LDO regulator or PMOS transistor.
state | Select one of the IRTC WKUP/TAMPER0 Pin States. |
#define IRTC_InstallCallback | ( | ip, | |
callback | |||
) |
This function installs callback function for IRTC interrupt vector 41.
ip | Select one of the ARM Cortex-M0+ Interrupt Priority Levels. |
callback | Pointer to the IRTC Callback Function. |
#define IRTC_Init | ( | irtc, | |
t0, | |||
t1, | |||
t2, | |||
mask | |||
) |
This function initializes Independent Real Time Clock (IRTC) and functionality of all three tamper pins. Call IRTC_InstallCallback function to install callback function for IRTC interrupt vector 45.
irtc | Select one of the IRTC Configuration Structures. |
t0 | TAMPER0 pin configuration IRTC Tamper Configuration Structures. |
t1 | TAMPER1 pin configuration IRTC Tamper Configuration Structures. |
t2 | TAMPER2 pin configuration IRTC Tamper Configuration Structures. |
mask | Select one or more OR'ed IRTC Interrupts. Remaining interrupts will be disabled. |
mask
. An attempt to debug this function may fail due to IRTC lock/unlock mechanism. #define IRTC_WkupInit | ( | irtc, | |
t1, | |||
t2, | |||
mask | |||
) |
This function initializes Independent Real Time Clock (IRTC) and functionality of two tamper pins (TAMPER1 and TAMPER2). The TAMPER0 pin is configured into hibernation mode. Call IRTC_InstallCallback function to install callback function for IRTC interrupt vector 45.
irtc | Select one of the IRTC Configuration Structures. |
t1 | TAMPER1 pin configuration IRTC Tamper Configuration Structures. |
t2 | TAMPER2 pin configuration IRTC Tamper Configuration Structures. |
mask | Select one or more OR'ed IRTC Interrupts. Remaining interrupts will be disabled. |
mask
. An attempt to debug this function may fail due to IRTC lock/unlock mechanism.