MAX32665 SDK Documentation  0.2
Software Development Kit Overview and API Documentation
HTMR

Modules

 HTMR_Registers
 Registers, Bit Masks and Bit Positions for the HTMR Peripheral Module.
 

Functions

int HTMR_EnableLongIntInterrupt (mxc_htmr_regs_t *htmr)
 Enables Long Interval Counter's Alarm Interrupt. More...
 
int HTMR_DisableLongIntInterrupt (mxc_htmr_regs_t *htmr)
 Disable Long Interval Counter's Alarm Interrupt. More...
 
int HTMR_EnableShortIntInterrupt (mxc_htmr_regs_t *htmr)
 Enables Short Interval Counter's Alarm Interrupt. More...
 
int HTMR_DisableShortIntInterrupt (mxc_htmr_regs_t *htmr)
 Disable Short Interval's Alarm Interrupt. More...
 
int HTMR_SetLongIntAlarm (mxc_htmr_regs_t *htmr, uint32_t ras)
 Set Long Interval alarm value and enable Interrupt. More...
 
int HTMR_SetShortIntAlarm (mxc_htmr_regs_t *htmr, uint32_t rssa)
 Set Short Interval alarm value and enable interrupt,. More...
 
int HTMR_Enable (mxc_htmr_regs_t *htmr)
 Enable/Start the High Speed Timer. More...
 
int HTMR_Disable (mxc_htmr_regs_t *htmr)
 Disable/Stop the High Speed Timer. More...
 
int HTMR_Init (mxc_htmr_regs_t *htmr, uint32_t sec, uint8_t ssec, sys_cfg_htmr_t *sys_cfg)
 Initialize the sec and ssec registers and enable HTMR. More...
 
int HTMR_CheckBusy (mxc_htmr_regs_t *htmr)
 Check if BUSY bit is 0. More...
 
int HTMR_GetFlags (mxc_htmr_regs_t *htmr)
 Gets Interrupt flags. More...
 
int HTMR_ClearFlags (mxc_htmr_regs_t *htmr, int flags)
 Clear Interrupt flag. More...
 
int HTMR_GetShortCount (mxc_htmr_regs_t *htmr)
 Gets value in short interval register. More...
 
int HTMR_GetLongCount (mxc_htmr_regs_t *htmr)
 Gets value in long interval register. More...
 

Detailed Description

Function Documentation

◆ HTMR_EnableLongIntInterrupt()

int HTMR_EnableLongIntInterrupt ( mxc_htmr_regs_t htmr)
Parameters
htmrpointer to the htmr register structure
Returns
E_SUCCESS If function is successful.
E_BUSY If function is unsuccessful.

◆ HTMR_DisableLongIntInterrupt()

int HTMR_DisableLongIntInterrupt ( mxc_htmr_regs_t htmr)
Parameters
htmrpointer to the htmr register structure
Returns
E_SUCCESS If function is successful.
E_BUSY If function is unsuccessful.

◆ HTMR_EnableShortIntInterrupt()

int HTMR_EnableShortIntInterrupt ( mxc_htmr_regs_t htmr)
Parameters
htmrpointer to the htmr register structure
Returns
E_SUCCESS If function is successful.
E_BUSY If function is unsuccessful.

◆ HTMR_DisableShortIntInterrupt()

int HTMR_DisableShortIntInterrupt ( mxc_htmr_regs_t htmr)
Parameters
htmrpointer to the htmr register structure
Returns
E_SUCCESS If function is successful.
E_BUSY If function is unsuccessful.

◆ HTMR_SetLongIntAlarm()

int HTMR_SetLongIntAlarm ( mxc_htmr_regs_t htmr,
uint32_t  ras 
)
Parameters
htmrpointer to the htmr register structure
ras20-bit value 0-0xFFFFF
Returns
E_SUCCESS If function is successful.
E_BAD_PARAM If there is an invalid parameter.
E_BUSY If function is unsuccessful.

◆ HTMR_SetShortIntAlarm()

int HTMR_SetShortIntAlarm ( mxc_htmr_regs_t htmr,
uint32_t  rssa 
)
Parameters
htmrpointer to the htmr register structure
rssa32-bit value 0-0xFFFFFFFF
Returns
E_SUCCESS If function is successful.
E_BUSY If function is unsuccessful.

◆ HTMR_Enable()

int HTMR_Enable ( mxc_htmr_regs_t htmr)
Parameters
htmrpointer to the htmr register structure
Returns
E_SUCCESS If function is successful.
E_BUSY If function is unsuccessful.

◆ HTMR_Disable()

int HTMR_Disable ( mxc_htmr_regs_t htmr)
Parameters
htmrpointer to the htmr register structure
Returns
E_SUCCESS If function is successful.
E_BUSY If function is unsuccessful.

◆ HTMR_Init()

int HTMR_Init ( mxc_htmr_regs_t htmr,
uint32_t  sec,
uint8_t  ssec,
sys_cfg_htmr_t *  sys_cfg 
)
Parameters
htmrpointer to the htmr register structure
secset the HTMR long counter (32-bit)
ssecset the HTMR short counter (8-bit)
sys_cfgSystem configuration object
Returns
E_SUCCESS If function is successful.
E_BAD_STATE If HTMR is not in a valid state.

◆ HTMR_CheckBusy()

int HTMR_CheckBusy ( mxc_htmr_regs_t htmr)
Parameters
htmrpointer to the htmr register structure
Returns
E_SUCCESS If function is successful.
E_BUSY If function is unsuccessful.

◆ HTMR_GetFlags()

int HTMR_GetFlags ( mxc_htmr_regs_t htmr)
Parameters
htmrpointer to the htmr register structure
Returns
Interrupts flags that have not been cleared

◆ HTMR_ClearFlags()

int HTMR_ClearFlags ( mxc_htmr_regs_t htmr,
int  flags 
)
Parameters
htmrpointer to the htmr register structure
flagsthe flags that need to be cleared

◆ HTMR_GetShortCount()

int HTMR_GetShortCount ( mxc_htmr_regs_t htmr)
Parameters
htmrpointer to the htmr register structure
Returns
Returns short count value

◆ HTMR_GetLongCount()

int HTMR_GetLongCount ( mxc_htmr_regs_t htmr)
Parameters
htmrpointer to the htmr register structure
Returns
returns long count value