MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the thermal management unit (TMU) module of MCUXpresso SDK devices.
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/tmu_1
Data Structures | |
struct | tmu_thresold_config_t |
configuration for TMU thresold. More... | |
struct | tmu_interrupt_status_t |
TMU interrupt status. More... | |
struct | tmu_config_t |
Configuration for TMU module. More... | |
Macros | |
#define | FSL_TMU_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
TMU driver version. More... | |
Functions | |
void | TMU_Init (TMU_Type *base, const tmu_config_t *config) |
Enable the access to TMU registers and Initialize TMU module. More... | |
void | TMU_Deinit (TMU_Type *base) |
De-initialize TMU module and Disable the access to DCDC registers. More... | |
void | TMU_GetDefaultConfig (tmu_config_t *config) |
Gets the default configuration for TMU. More... | |
static void | TMU_Enable (TMU_Type *base, bool enable) |
Enable/Disable monitoring the temperature sensor. More... | |
static void | TMU_EnableInterrupts (TMU_Type *base, uint32_t mask) |
Enable the TMU interrupts. More... | |
static void | TMU_DisableInterrupts (TMU_Type *base, uint32_t mask) |
Disable the TMU interrupts. More... | |
void | TMU_GetInterruptStatusFlags (TMU_Type *base, tmu_interrupt_status_t *status) |
Get interrupt status flags. More... | |
void | TMU_ClearInterruptStatusFlags (TMU_Type *base, uint32_t mask) |
Clear interrupt status flags. More... | |
status_t | TMU_GetImmediateTemperature (TMU_Type *base, uint32_t *temperature) |
Get the last immediate temperature at site. More... | |
status_t | TMU_GetAverageTemperature (TMU_Type *base, uint32_t *temperature) |
Get the last average temperature at site. More... | |
void | TMU_SetHighTemperatureThresold (TMU_Type *base, const tmu_thresold_config_t *config) |
Configure the high temperature thresold value and enable/disable relevant thresold. More... | |
struct tmu_thresold_config_t |
Data Fields | |
bool | immediateThresoldEnable |
Enable high temperature immediate threshold. More... | |
bool | AverageThresoldEnable |
Enable high temperature average threshold. More... | |
bool | AverageCriticalThresoldEnable |
Enable high temperature average critical threshold. More... | |
uint8_t | immediateThresoldValue |
Range:10U-125U. More... | |
uint8_t | averageThresoldValue |
Range:10U-125U. More... | |
uint8_t | averageCriticalThresoldValue |
Range:10U-125U. More... | |
struct tmu_interrupt_status_t |
Data Fields | |
uint32_t | interruptDetectMask |
The mask of interrupt status flags. More... | |
struct tmu_config_t |
Data Fields | |
tmu_average_low_pass_filter_t | averageLPF |
The average temperature is calculated as: ALPF x Current_Temp + (1 - ALPF) x Average_Temp. More... | |
tmu_amplifier_gain_t | amplifierGain |
Amplifier gain setting. More... | |
tmu_amplifier_reference_voltage_t | amplifierVref |
Amplifier reference voltage setting. More... | |
#define FSL_TMU_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
Version 2.0.1.
enum tmu_amplifier_gain_t |
void TMU_Init | ( | TMU_Type * | base, |
const tmu_config_t * | config | ||
) |
base | TMU peripheral base address. |
config | Pointer to configuration structure. Refer to "tmu_config_t" structure. |
void TMU_Deinit | ( | TMU_Type * | base | ) |
base | TMU peripheral base address. |
void TMU_GetDefaultConfig | ( | tmu_config_t * | config | ) |
This function initializes the user configuration structure to default value. The default value are:
Example:
config | Pointer to TMU configuration structure. |
|
inlinestatic |
base | TMU peripheral base address. |
enable | Switcher to enable/disable TMU. |
|
inlinestatic |
bas | TMU peripheral base address. |
mask | The interrupt mask. Refer to "_tmu_interrupt_enable" enumeration. |
|
inlinestatic |
bas | TMU peripheral base address. |
mask | The interrupt mask. Refer to "_tmu_interrupt_enable" enumeration. |
void TMU_GetInterruptStatusFlags | ( | TMU_Type * | base, |
tmu_interrupt_status_t * | status | ||
) |
base | TMU peripheral base address. |
status | The pointer to interrupt status structure. Record the current interrupt status. Please refer to "tmu_interrupt_status_t" structure. |
void TMU_ClearInterruptStatusFlags | ( | TMU_Type * | base, |
uint32_t | mask | ||
) |
base | TMU peripheral base address. |
The | mask of interrupt status flags. Refer to "_tmu_interrupt_status_flags" enumeration. |
status_t TMU_GetImmediateTemperature | ( | TMU_Type * | base, |
uint32_t * | temperature | ||
) |
base | TMU peripheral base address. |
temperature | Last immediate temperature reading at site when V=1. |
kStatus_Success | Temperature reading is valid. |
kStatus_Fail | Temperature reading is not valid because temperature out of sensor range or first measurement still pending. |
status_t TMU_GetAverageTemperature | ( | TMU_Type * | base, |
uint32_t * | temperature | ||
) |
base | TMU peripheral base address. |
temperature | Last average temperature reading at site. |
kStatus_Success | Temperature reading is valid. |
kStatus_Fail | Temperature reading is not valid because temperature out of sensor range or first measurement still pending. |
void TMU_SetHighTemperatureThresold | ( | TMU_Type * | base, |
const tmu_thresold_config_t * | config | ||
) |
base | TMU peripheral base address. |
config | Pointer to configuration structure. Refer to "tmu_thresold_config_t" structure. |
bool tmu_thresold_config_t::immediateThresoldEnable |
bool tmu_thresold_config_t::AverageThresoldEnable |
bool tmu_thresold_config_t::AverageCriticalThresoldEnable |
uint8_t tmu_thresold_config_t::immediateThresoldValue |
Valid when corresponding threshold is enabled. High temperature immediate threshold value. Determines the current upper temperature threshold, for any enabled monitored site.
uint8_t tmu_thresold_config_t::averageThresoldValue |
Valid when corresponding threshold is enabled. High temperature average threshold value. Determines the average upper temperature threshold, for any enabled monitored site.
uint8_t tmu_thresold_config_t::averageCriticalThresoldValue |
Valid when corresponding threshold is enabled. High temperature average critical threshold value. Determines the average upper critical temperature threshold, for any enabled monitored site.
uint32_t tmu_interrupt_status_t::interruptDetectMask |
Refer to "_tmu_interrupt_status_flags" enumeration.
tmu_average_low_pass_filter_t tmu_config_t::averageLPF |
For proper operation, this field should only change when monitoring is disabled.
tmu_amplifier_gain_t tmu_config_t::amplifierGain |
tmu_amplifier_reference_voltage_t tmu_config_t::amplifierVref |