![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
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
Data Structures | |
| struct | _tmu_thresold_config |
| configuration for TMU thresold. More... | |
| struct | _tmu_interrupt_status |
| TMU interrupt status. More... | |
| struct | _tmu_config |
| Configuration for TMU module. More... | |
Macros | |
| #define | FSL_TMU_DRIVER_VERSION (MAKE_VERSION(2, 1, 1)) |
| TMU driver version. More... | |
Typedefs | |
| typedef struct _tmu_thresold_config | tmu_thresold_config_t |
| configuration for TMU thresold. | |
|
typedef struct _tmu_interrupt_status | tmu_interrupt_status_t |
| TMU interrupt status. | |
|
typedef enum _tmu_average_low_pass_filter | tmu_average_low_pass_filter_t |
| Average low pass filter setting. | |
| typedef enum _tmu_amplifier_gain | tmu_amplifier_gain_t |
| Amplifier gain setting. | |
|
typedef enum _tmu_amplifier_reference_voltage | tmu_amplifier_reference_voltage_t |
| Amplifier reference voltage setting. | |
| typedef struct _tmu_config | tmu_config_t |
| Configuration for TMU module. | |
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 |
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... | |
| bool _tmu_thresold_config::immediateThresoldEnable |
| bool _tmu_thresold_config::AverageThresoldEnable |
| bool _tmu_thresold_config::AverageCriticalThresoldEnable |
| uint8_t _tmu_thresold_config::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::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::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.
| struct _tmu_interrupt_status |
Data Fields | |
| uint32_t | interruptDetectMask |
| The mask of interrupt status flags. More... | |
| uint32_t _tmu_interrupt_status::interruptDetectMask |
Refer to "_tmu_interrupt_status_flags" enumeration.
| struct _tmu_config |
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_average_low_pass_filter_t _tmu_config::averageLPF |
For proper operation, this field should only change when monitoring is disabled.
| #define FSL_TMU_DRIVER_VERSION (MAKE_VERSION(2, 1, 1)) |
Version 2.1.1.
| enum _tmu_amplifier_gain |
| 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 |
| base | TMU peripheral base address. |
| mask | The interrupt mask. Refer to "_tmu_interrupt_enable" enumeration. |
|
inlinestatic |
| base | 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. |
| mask | 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. |