Sam Shi / Mbed 2 deprecated unytefont

Dependencies:   Adafruit_GFX_customizedfont BLE_API USBDevice mbed

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

Embed: (wiki syntax)

« Back to documentation index

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

Selects an internal module clock for clock scaling configuration.

Enumerator:
MXC_E_CLKMAN_CLK_SYS 

Main System clock.

MXC_E_CLKMAN_CLK_GPIO 

GPIO module clock.

MXC_E_CLKMAN_CLK_PT 

Pulse Train engine clock.

MXC_E_CLKMAN_CLK_SPI0 

SPI instance 0 module clock.

MXC_E_CLKMAN_CLK_SPI1 

SPI instance 1 module clock.

MXC_E_CLKMAN_CLK_SPI2 

SPI instance 2 module clock.

MXC_E_CLKMAN_CLK_I2CM 

I2C Master module clock (for all instances)

MXC_E_CLKMAN_CLK_I2CS 

I2C Slave module clock.

MXC_E_CLKMAN_CLK_LCD_CHPUMP 

LCD Charge pump clock.

MXC_E_CLKMAN_CLK_PUF 

Reserved.

MXC_E_CLKMAN_CLK_PRNG 

PRNG module clock.

MXC_E_CLKMAN_CLK_WDT0 

Watchdog Timer 0 clock.

MXC_E_CLKMAN_CLK_WDT1 

Watchdog Timer 1 clock.

MXC_E_CLKMAN_CLK_RTC_INT_SYNC 

RTC synchronizer clock (required for cross-clock-domain register updates)

MXC_E_CLKMAN_CLK_DAC0 

Clock for DAC 0.

MXC_E_CLKMAN_CLK_DAC1 

Clock for DAC 1.

MXC_E_CLKMAN_CLK_DAC2 

Clock for DAC 2.

MXC_E_CLKMAN_CLK_DAC3 

Clock for DAC 3.

Definition at line 53 of file clkman.h.

Selects a TPU module clock for crypto ring-oscillator clock scaling configuration.

Enumerator:
MXC_E_CLKMAN_CRYPT_CLK_AES 

AES engine clock.

MXC_E_CLKMAN_CRYPT_CLK_MAA 

Modular Arithmetic Accelerator (MAA) clock.

MXC_E_CLKMAN_CRYPT_CLK_PRNG 

Pseudo-random number Generator (PRNG) clock.

Definition at line 95 of file clkman.h.


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_countNumber 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_bypass1 for crystal receiver bypass, 0 for no bypass.
hfx_gm_adjustHigh frequency crystal gain adjust.
hfx_dc_controlHigh 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_selectPhase locked loop clock input.
pll_divisor_selectInput clock frequency for the phase locked loop.
pll_stability_countNumber of clocks before phase locked loop is stable.
pll_bypass1 for high frequency oscillator output for 48MHz clock, 0 for phase locked loop output.
pll_8mhz_enable1 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_selectAnalog to digital converter clock source.
adc_clk_modeDivide 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_clkdevice enum for clock scale setup
clk_scaleSystem 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_clkdevice enum for clock scale setup
clk_scaleSystem clock scale.
void CLKMAN_SetRTOSMode ( uint8_t  enable )

Set RTC clock for systick counter, allowing systick to operate in full clockgating powersaving mode.

Parameters:
enable1 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_selectSystem 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:
indexIndex of watchdog to set clock.
watchdog_source_selectWatchdog 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:
indexIndex of watchdog to disable.
Returns:
0 => Success. Non zero => error condition.