MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
TEMPMON: Temperature Monitor Module

Overview

The MCUXpresso SDK provides a peripheral driver for the Temperature Monitor Module (TEMPMON) module of MCUXpresso SDK devices.

The function TEMPMON_Init() will initialize the TEMPMON peripheral operation.

The function TEMPMON_Deinit() will deinitialize the TEMPMON peripheral operation.

The function TEMPMON_GetDefaultConfig() will get default configuration.

The function TEMPMON_StartMeasure() will start the temperature measurement process.

The function TEMPMON_StopMeasure() will stop the temperature measurement process.

The function TEMPMON_GetCurrentTemp() will get the current temperature.

The function TEMPMON_SetTempAlarm() will set the temperature count that will generate an alarm interrupt.

Files

file  fsl_tempmon.h
 

Data Structures

struct  tempmon_config_t
 TEMPMON temperature structure. More...
 

Enumerations

enum  tempmon_alarm_mode {
  kTEMPMON_HighAlarmMode = 0U,
  kTEMPMON_PanicAlarmMode = 1U,
  kTEMPMON_LowAlarmMode = 2U
}
 TEMPMON alarm mode. More...
 

Functions

void TEMPMON_Init (TEMPMON_Type *base, const tempmon_config_t *config)
 Initializes the TEMPMON module. More...
 
void TEMPMON_Deinit (TEMPMON_Type *base)
 Deinitializes the TEMPMON module. More...
 
void TEMPMON_GetDefaultConfig (tempmon_config_t *config)
 Gets the default configuration structure. More...
 
static void TEMPMON_StartMeasure (TEMPMON_Type *base)
 start the temperature measurement process. More...
 
static void TEMPMON_StopMeasure (TEMPMON_Type *base)
 stop the measurement process. More...
 
float TEMPMON_GetCurrentTemperature (TEMPMON_Type *base)
 Get current temperature with the fused temperature calibration data. More...
 
void TEMPMON_SetTempAlarm (TEMPMON_Type *base, uint32_t tempVal, tempmon_alarm_mode alarmMode)
 Set the temperature count (raw sensor output) that will generate an alarm interrupt. More...
 

Driver version

#define FSL_TEMPMON_DRIVER_VERSION   (MAKE_VERSION(2, 0, 1))
 Version 2.0.1.
 

Data Structure Documentation

struct tempmon_config_t

Data Fields

uint16_t frequency
 The temperature measure frequency. More...
 
uint32_t highAlarmTemp
 The high alarm temperature. More...
 
uint32_t panicAlarmTemp
 The panic alarm temperature. More...
 
uint32_t lowAlarmTemp
 The low alarm temperature. More...
 

Field Documentation

uint16_t tempmon_config_t::frequency
uint32_t tempmon_config_t::highAlarmTemp
uint32_t tempmon_config_t::panicAlarmTemp
uint32_t tempmon_config_t::lowAlarmTemp

Enumeration Type Documentation

Enumerator
kTEMPMON_HighAlarmMode 

The high alarm temperature interrupt mode.

kTEMPMON_PanicAlarmMode 

The panic alarm temperature interrupt mode.

kTEMPMON_LowAlarmMode 

The low alarm temperature interrupt mode.

Function Documentation

void TEMPMON_Init ( TEMPMON_Type *  base,
const tempmon_config_t config 
)
Parameters
baseTEMPMON base pointer
configPointer to configuration structure.
void TEMPMON_Deinit ( TEMPMON_Type *  base)
Parameters
baseTEMPMON base pointer
void TEMPMON_GetDefaultConfig ( tempmon_config_t config)

This function initializes the TEMPMON configuration structure to a default value. The default values are: tempmonConfig->frequency = 0x02U; tempmonConfig->highAlarmTemp = 44U; tempmonConfig->panicAlarmTemp = 90U; tempmonConfig->lowAlarmTemp = 39U;

Parameters
configPointer to a configuration structure.
static void TEMPMON_StartMeasure ( TEMPMON_Type *  base)
inlinestatic
Parameters
baseTEMPMON base pointer.
static void TEMPMON_StopMeasure ( TEMPMON_Type *  base)
inlinestatic
Parameters
baseTEMPMON base pointer
float TEMPMON_GetCurrentTemperature ( TEMPMON_Type *  base)
Parameters
baseTEMPMON base pointer
Returns
current temperature with degrees Celsius.
void TEMPMON_SetTempAlarm ( TEMPMON_Type *  base,
uint32_t  tempVal,
tempmon_alarm_mode  alarmMode 
)
Parameters
baseTEMPMON base pointer
tempValThe alarm temperature with degrees Celsius
alarmModeThe alarm mode.