Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Adafruit_GFX_customizedfont BLE_API USBDevice mbed
Fork of mbed-os-example-mbed5-blinky by
CLKMAN
This is the high level API for the clock management module of the MAX32600 family of ARM Cortex based embedded microcontrollers. More...
Enumerations | |
| enum | mxc_clkman_clk_t { MXC_E_CLKMAN_CLK_SYS = 0, MXC_E_CLKMAN_CLK_GPIO, MXC_E_CLKMAN_CLK_PT, MXC_E_CLKMAN_CLK_SPI0, MXC_E_CLKMAN_CLK_SPI1, MXC_E_CLKMAN_CLK_SPI2, MXC_E_CLKMAN_CLK_I2CM, MXC_E_CLKMAN_CLK_I2CS, MXC_E_CLKMAN_CLK_LCD_CHPUMP, MXC_E_CLKMAN_CLK_PUF, MXC_E_CLKMAN_CLK_PRNG, MXC_E_CLKMAN_CLK_WDT0, MXC_E_CLKMAN_CLK_WDT1, MXC_E_CLKMAN_CLK_RTC_INT_SYNC, MXC_E_CLKMAN_CLK_DAC0, MXC_E_CLKMAN_CLK_DAC1, MXC_E_CLKMAN_CLK_DAC2, MXC_E_CLKMAN_CLK_DAC3 } |
Selects an internal module clock for clock scaling configuration. More... | |
| enum | mxc_clkman_crypt_clk_t { MXC_E_CLKMAN_CRYPT_CLK_AES = 0, MXC_E_CLKMAN_CRYPT_CLK_MAA, MXC_E_CLKMAN_CRYPT_CLK_PRNG } |
Selects a TPU module clock for crypto ring-oscillator clock scaling configuration. More... | |
Functions | |
| int32_t | CLKMAN_HFXConfig (uint8_t hfx_bypass, uint8_t hfx_gm_adjust, uint8_t hfx_dc_control) |
| Configures but does not enable the high frequency external oscillator circuitry. | |
| void | CLKMAN_HFXEnable (void) |
| Enables the high frequency crystal receiver. | |
| int32_t | CLKMAN_HFXDisable (void) |
| Disables the high frequency crystal receiver. | |
| int32_t | CLKMAN_PLLConfig (mxc_clkman_pll_input_select_t pll_input_select, mxc_clkman_pll_divisor_select_t pll_divisor_select, mxc_clkman_stability_count_t pll_stability_count, uint8_t pll_bypass, uint8_t pll_8mhz_enable) |
| Configures but does not enable the phase locked loop circuitry. | |
| void | CLKMAN_PLLEnable (void) |
| Enables the phase locked loop circuitry. | |
| int32_t | CLKMAN_PLLDisable (void) |
| Disables the phase locked loop circuitry. | |
| void | CLKMAN_TrimRO_Start (void) |
| Starts the Trim calibration of the relaxation oscillator off the 32kHz crystal for use with USB. | |
| void | CLKMAN_TrimRO_Stop (void) |
| Stops the Trim calibration of the relaxation oscillator off the 32kHz crystal for use with USB. | |
| int32_t | CLKMAN_SetSystemClock (mxc_clkman_system_source_select_t system_source_select) |
| Sets the system clock source if the source is valid. | |
| void | CLKMAN_WaitForSystemClockStable (void) |
| Polls on the clock stable flags until all are stable. | |
| void | CLKMAN_USBClockEnable (void) |
| Enables the USB clock. | |
| void | CLKMAN_USBClockDisable (void) |
| Disables the USB clock. | |
| int32_t | CLKMAN_CryptoClockConfig (mxc_clkman_stability_count_t crypto_stability_count) |
| Configures but does not enable the crypto clock. | |
| void | CLKMAN_CryptoClockEnable (void) |
| Enables the crypto clock. | |
| void | CLKMAN_CryptoClockDisable (void) |
| Disables the crypto clock. | |
| int32_t | CLKMAN_SetADCClock (mxc_clkman_adc_source_select_t adc_source_select, mxc_adc_clk_mode adc_clk_mode) |
| Sets the analog to digital converter clock source if the source is valid. | |
| void | CLKMAN_ADCClockDisable (void) |
| Disables the analog to digital converter clock source. | |
| int32_t | CLKMAN_SetWatchdogClock (uint8_t index, mxc_clkman_wdt_source_select_t watchdog_source_select) |
| Sets the watchdog clock source if the source is valid for the watchdog specified. | |
| int32_t | CLKMAN_WatchdogClockDisable (uint8_t index) |
| Disable the watchdog clock source for the watchdog specified. | |
| void | CLKMAN_SetClkScale (mxc_clkman_clk_t device_clk, mxc_clkman_clk_scale_t clk_scale) |
| Set the system clock scale. | |
| void | CLKMAN_SetCryptClkScale (mxc_clkman_crypt_clk_t device_clk, mxc_clkman_clk_scale_t clk_scale) |
| Set the TPU clock scale. | |
| void | CLKMAN_SetRTOSMode (uint8_t enable) |
| Set RTC clock for systick counter, allowing systick to operate in full clockgating powersaving mode. | |
Detailed Description
This is the high level API for the clock management module of the MAX32600 family of ARM Cortex based embedded microcontrollers.
Enumeration Type Documentation
| enum mxc_clkman_clk_t |
Selects an internal module clock for clock scaling configuration.
- Enumerator:
Function Documentation
| void CLKMAN_ADCClockDisable | ( | void | ) |
Disables the analog to digital converter clock source.
| int32_t CLKMAN_CryptoClockConfig | ( | mxc_clkman_stability_count_t | crypto_stability_count ) |
Configures but does not enable the crypto clock.
- Parameters:
-
crypto_stability_count Number of clocks before crypto clock is stable.
- Returns:
- 0 => Success. Non zero => error condition.
| void CLKMAN_CryptoClockDisable | ( | void | ) |
Disables the crypto clock.
| void CLKMAN_CryptoClockEnable | ( | void | ) |
Enables the crypto clock.
| int32_t CLKMAN_HFXConfig | ( | uint8_t | hfx_bypass, |
| uint8_t | hfx_gm_adjust, | ||
| uint8_t | hfx_dc_control | ||
| ) |
Configures but does not enable the high frequency external oscillator circuitry.
- Parameters:
-
hfx_bypass 1 for crystal receiver bypass, 0 for no bypass. hfx_gm_adjust High frequency crystal gain adjust. hfx_dc_control High frequency crystal dc control.
- Returns:
- 0 => Success. Non zero => error condition.
| int32_t CLKMAN_HFXDisable | ( | void | ) |
Disables the high frequency crystal receiver.
- Returns:
- 0 => Success. Non zero => error condition.
| void CLKMAN_HFXEnable | ( | void | ) |
Enables the high frequency crystal receiver.
Make sure HFX is stable before switching system clock.
| int32_t CLKMAN_PLLConfig | ( | mxc_clkman_pll_input_select_t | pll_input_select, |
| mxc_clkman_pll_divisor_select_t | pll_divisor_select, | ||
| mxc_clkman_stability_count_t | pll_stability_count, | ||
| uint8_t | pll_bypass, | ||
| uint8_t | pll_8mhz_enable | ||
| ) |
Configures but does not enable the phase locked loop circuitry.
- Parameters:
-
pll_input_select Phase locked loop clock input. pll_divisor_select Input clock frequency for the phase locked loop. pll_stability_count Number of clocks before phase locked loop is stable. pll_bypass 1 for high frequency oscillator output for 48MHz clock, 0 for phase locked loop output. pll_8mhz_enable 1 for enable 8MHz phase locked loop output, 0 for disable.
- Returns:
- 0 => Success. Non zero => error condition.
| int32_t CLKMAN_PLLDisable | ( | void | ) |
Disables the phase locked loop circuitry.
- Returns:
- 0 => Success. Non zero => error condition.
| void CLKMAN_PLLEnable | ( | void | ) |
Enables the phase locked loop circuitry.
| int32_t CLKMAN_SetADCClock | ( | mxc_clkman_adc_source_select_t | adc_source_select, |
| mxc_adc_clk_mode | adc_clk_mode | ||
| ) |
Sets the analog to digital converter clock source if the source is valid.
- Parameters:
-
adc_source_select Analog to digital converter clock source. adc_clk_mode Divide the clock source into the ADC if source is too high. ADC must run at 8MHz.
- Returns:
- 0 => Success. Non zero => error condition.
| void CLKMAN_SetClkScale | ( | mxc_clkman_clk_t | device_clk, |
| mxc_clkman_clk_scale_t | clk_scale | ||
| ) |
Set the system clock scale.
- Parameters:
-
device_clk device enum for clock scale setup clk_scale System clock scale.
| void CLKMAN_SetCryptClkScale | ( | mxc_clkman_crypt_clk_t | device_clk, |
| mxc_clkman_clk_scale_t | clk_scale | ||
| ) |
Set the TPU clock scale.
- Parameters:
-
device_clk device enum for clock scale setup clk_scale System clock scale.
| void CLKMAN_SetRTOSMode | ( | uint8_t | enable ) |
Set RTC clock for systick counter, allowing systick to operate in full clockgating powersaving mode.
- Parameters:
-
enable 1 enable 0 disable
| int32_t CLKMAN_SetSystemClock | ( | mxc_clkman_system_source_select_t | system_source_select ) |
Sets the system clock source if the source is valid.
Make sure HFX is stable before switching system clock.
- Parameters:
-
system_source_select System clock source.
- Returns:
- 0 => Success. Non zero => error condition.
| int32_t CLKMAN_SetWatchdogClock | ( | uint8_t | index, |
| mxc_clkman_wdt_source_select_t | watchdog_source_select | ||
| ) |
Sets the watchdog clock source if the source is valid for the watchdog specified.
- Parameters:
-
index Index of watchdog to set clock. watchdog_source_select Watchdog clock source.
- Returns:
- 0 => Success. Non zero => error condition.
| void CLKMAN_TrimRO_Start | ( | void | ) |
Starts the Trim calibration of the relaxation oscillator off the 32kHz crystal for use with USB.
| void CLKMAN_TrimRO_Stop | ( | void | ) |
Stops the Trim calibration of the relaxation oscillator off the 32kHz crystal for use with USB.
| void CLKMAN_USBClockDisable | ( | void | ) |
Disables the USB clock.
| void CLKMAN_USBClockEnable | ( | void | ) |
Enables the USB clock.
| void CLKMAN_WaitForSystemClockStable | ( | void | ) |
Polls on the clock stable flags until all are stable.
| int32_t CLKMAN_WatchdogClockDisable | ( | uint8_t | index ) |
Disable the watchdog clock source for the watchdog specified.
- Parameters:
-
index Index of watchdog to disable.
- Returns:
- 0 => Success. Non zero => error condition.
Generated on Wed Jul 13 2022 02:36:20 by
1.7.2
