MKM34Z256VLx7 Bare Metal Software Drivers  R4.1.6
Reference Manual
LPTMR API Specification

Overview

This section describes functions and macros of the driver's API.

Macros

#define LPTMR_Enable()
 Resumes Timer operation. More...
 
#define LPTMR_Disable()
 Stops Timer operation. More...
 
#define LPTMR_Reset()
 Resets counter of the running Timer. More...
 
#define LPTMR_GetCmpFlag()
 Returns Timer compare flag. More...
 
#define LPTMR_ClrCmpFlag()
 Clears Timer compare flag. More...
 
#define LPTRM_SetCmpVal(val)
 Sets compare register. More...
 
#define LPTMR_InstallCallback(ip, callback)
 Installs callback function for LPTMR interrupt vector 46. More...
 
#define LPTMR_Init(cfg, val)
 LPTMR initialization. More...
 

Functions

static uint16 LPTMR_ReadCnt (void)
 Returns Timer counter value. More...
 

Macro Definition Documentation

#define LPTMR_Enable ( )

This macro enables operation of the Low-Power Timer (LPTMR) block.

Note
Implemented as an inline macro.
See also
LPTMR_Disable
#define LPTMR_Disable ( )

This macro terminates operation of the Low-Power Timer (LPTMR) block.

Note
Implemented as an inline macro.
See also
LPTMR_Enable
#define LPTMR_Reset ( )

This macro resets counter of the running Timer. After counter reset Timer continue in operation.

Note
Implemented as an inline macro.
#define LPTMR_GetCmpFlag ( )

This macro returns Timer compare flag when Timer increments.

Returns
true (non-zero) value of counter is equal to compare value,
false value of counter is not equal to compare value.
Note
Implemented as an inline macro.
See also
LPTMR_ClrCmpFlag
#define LPTMR_ClrCmpFlag ( )

This macro clears Timer compare flag.

Note
Implemented as an inline macro.
See also
LPTMR_GetCmpFlag
#define LPTRM_SetCmpVal (   val)

This macro sets new value into compare register.

Parameters
val16-bit integer value.
Note
Implemented as an inline macro.
#define LPTMR_InstallCallback (   ip,
  callback 
)

This function installs callback function for LPTMR interrupt vector 46.

Parameters
ipSelect one of the ARM Cortex-M0+ Interrupt Priority Levels.
callbackPointer to the LPTMR Callback Function.
Note
Implemented as a function call.
See also
LPTMR_Init
#define LPTMR_Init (   cfg,
  val 
)

This function initializes Low-Power Timer (LPTRM) block. Call LPTMR_InstallCallback function to install callback function for LPTMR interrupt vector 46.

Parameters
cfgSelect one of the of LPTMR Configuration Structures.
val16-bit integer compare register value (defines period of the interrupt generation).
Note
Implemented as a function call.
See also
LPTMR_InstallCallback

Function Documentation

static uint16 LPTMR_ReadCnt ( void  )
inlinestatic

This macro returns current value of the LPTMR counter.

Returns
uint32 counter register value.
Note
Implemented as an inline function.
Warning
When reading the CNR, the bus clock must be at least two times faster than the rate at which the LPTMR counter is incrementing, otherwise incorrect data may be returned.