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.
uint16_t tempmon_config_t::frequency |
uint32_t tempmon_config_t::highAlarmTemp |
uint32_t tempmon_config_t::panicAlarmTemp |
uint32_t tempmon_config_t::lowAlarmTemp |
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.
|
- Parameters
-
base | TEMPMON base pointer |
config | Pointer to configuration structure. |
void TEMPMON_Deinit |
( |
TEMPMON_Type * |
base | ) |
|
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
-
config | Pointer to a configuration structure. |
static void TEMPMON_StartMeasure |
( |
TEMPMON_Type * |
base | ) |
|
|
inlinestatic |
- Parameters
-
base | TEMPMON base pointer. |
static void TEMPMON_StopMeasure |
( |
TEMPMON_Type * |
base | ) |
|
|
inlinestatic |
float TEMPMON_GetCurrentTemperature |
( |
TEMPMON_Type * |
base | ) |
|
- Parameters
-
- Returns
- current temperature with degrees Celsius.
void TEMPMON_SetTempAlarm |
( |
TEMPMON_Type * |
base, |
|
|
uint32_t |
tempVal, |
|
|
tempmon_alarm_mode |
alarmMode |
|
) |
| |
- Parameters
-
base | TEMPMON base pointer |
tempVal | The alarm temperature with degrees Celsius |
alarmMode | The alarm mode. |