![]() |
MT2523 API Reference
LinkIt SDK v4
|
This section introduces the DVFS driver APIs including terms and acronyms, supported features, details on how to use this driver, DVFS function groups, enums, structures and functions. More...
This section introduces the DVFS driver APIs including terms and acronyms, supported features, details on how to use this driver, DVFS function groups, enums, structures and functions.
The following provides descriptions of the terms commonly used in the DVFS driver and how to use its various functions.
| Terms | Details |
|---|---|
| DVFS | Dynamic Voltage and Frequency Scaling. |
| OPP | Operating Performance Point, a tuple of frequency and voltage. For more details, please refer to the section "Power modes" in MediaTek MT2523 datasheet.
|
Functions | |
| hal_dvfs_status_t | hal_dvfs_init (void) |
| The function initializes the DVFS framework. More... | |
| hal_dvfs_status_t | hal_dvfs_target_cpu_frequency (uint32_t target_freq, hal_dvfs_freq_relation_t relation) |
| This function adjusts the CPU frequency to a suitable target frequency according to the passed-in relation. More... | |
| uint32_t | hal_dvfs_get_cpu_frequency (void) |
| This function gets the current CPU frequency. More... | |
| hal_dvfs_status_t | hal_dvfs_get_cpu_frequency_list (const uint32_t **list, uint32_t *list_num) |
| This function gets all adjustable CPU frequencies listed in the OPP table. More... | |
Modules | |
| Enum | |
| uint32_t hal_dvfs_get_cpu_frequency | ( | void | ) |
This function gets the current CPU frequency.
| hal_dvfs_status_t hal_dvfs_get_cpu_frequency_list | ( | const uint32_t ** | list, |
| uint32_t * | list_num | ||
| ) |
This function gets all adjustable CPU frequencies listed in the OPP table.
| [out] | list | is a double pointer to the frequency table. |
| [out] | list_num | is a pointer to the number of the entries in the frequency table. |
| hal_dvfs_status_t hal_dvfs_init | ( | void | ) |
The function initializes the DVFS framework.
| hal_dvfs_status_t hal_dvfs_target_cpu_frequency | ( | uint32_t | target_freq, |
| hal_dvfs_freq_relation_t | relation | ||
| ) |
This function adjusts the CPU frequency to a suitable target frequency according to the passed-in relation.
| [in] | target_freq | is the target frequency in kHz. |
| [in] | relation | is the relationship between the target frequency and the final frequency. HAL_DVFS_FREQ_RELATION_L, the lowest frequency at or above the target level. HAL_DVFS_FREQ_RELATION_H, the highest frequency below or at the target level. Example 1. hal_dvfs_target_cpu_frequency(103000, HAL_DVFS_FREQ_RELATION_L). The final CPU frequency is equal to or greater than 103MHz.
hal_dvfs_target_cpu_frequency(103000, HAL_DVFS_FREQ_RELATION_H). The final CPU frequency is equal to or less than 103MHz.
|