STM8S/A Standard Peripherals Drivers: stm8s_clk.c File Reference

STM8S/A

stm8s_clk.c File Reference

This file contains all the functions for the CLK peripheral. More...

#include "stm8s_clk.h"

Go to the source code of this file.

Functions

void CLK_AdjustHSICalibrationValue (CLK_HSITrimValue_TypeDef CLK_HSICalibrationValue)
 Adjusts the Internal High Speed oscillator (HSI) calibration value.
void CLK_CCOCmd (FunctionalState NewState)
 Enables or disablle the Configurable Clock Output (CCO).
void CLK_CCOConfig (CLK_Output_TypeDef CLK_CCO)
 Output the selected clock on a dedicated I/O pin.
void CLK_ClearITPendingBit (CLK_IT_TypeDef CLK_IT)
 Clears the CLK�s interrupt pending bits.
void CLK_ClockSecuritySystemEnable (void)
 Enables the Clock Security System.
void CLK_ClockSwitchCmd (FunctionalState NewState)
 Starts or Stops manually the clock switch execution.
ErrorStatus CLK_ClockSwitchConfig (CLK_SwitchMode_TypeDef CLK_SwitchMode, CLK_Source_TypeDef CLK_NewClock, FunctionalState ITState, CLK_CurrentClockState_TypeDef CLK_CurrentClockState)
 configures the Switch from one clock to another
void CLK_DeInit (void)
 Deinitializes the CLK peripheral registers to their default reset values.
void CLK_FastHaltWakeUpCmd (FunctionalState NewState)
 Configures the High Speed Internal oscillator (HSI).
uint32_t CLK_GetClockFreq (void)
 This function returns the frequencies of different on chip clocks.
FlagStatus CLK_GetFlagStatus (CLK_Flag_TypeDef CLK_FLAG)
 Checks whether the specified CLK flag is set or not.
ITStatus CLK_GetITStatus (CLK_IT_TypeDef CLK_IT)
 Checks whether the specified CLK interrupt has is enabled or not.
CLK_Source_TypeDef CLK_GetSYSCLKSource (void)
 Returns the clock source used as system clock.
void CLK_HSECmd (FunctionalState NewState)
 Enable or Disable the External High Speed oscillator (HSE).
void CLK_HSICmd (FunctionalState NewState)
 Enables or disables the Internal High Speed oscillator (HSI).
void CLK_HSIPrescalerConfig (CLK_Prescaler_TypeDef HSIPrescaler)
 Configures the HSI clock dividers.
void CLK_ITConfig (CLK_IT_TypeDef CLK_IT, FunctionalState NewState)
 Enables or disables the specified CLK interrupts.
void CLK_LSICmd (FunctionalState NewState)
 Enables or disables the Internal Low Speed oscillator (LSI).
void CLK_PeripheralClockConfig (CLK_Peripheral_TypeDef CLK_Peripheral, FunctionalState NewState)
 Enables or disables the specified peripheral CLK.
void CLK_SlowActiveHaltWakeUpCmd (FunctionalState NewState)
 Configures the slow active halt wake up.
void CLK_SWIMConfig (CLK_SWIMDivider_TypeDef CLK_SWIMDivider)
 Configures the SWIM clock frequency on the fly.
void CLK_SYSCLKConfig (CLK_Prescaler_TypeDef CLK_Prescaler)
 Configures the HSI and CPU clock dividers.
void CLK_SYSCLKEmergencyClear (void)
 Reset the SWBSY flag (SWICR Register)

Variables

CONST uint8_t CLKPrescTable [8] = {1, 2, 4, 8, 10, 16, 20, 40}
CONST uint8_t HSIDivFactor [4] = {1, 2, 4, 8}

Detailed Description

This file contains all the functions for the CLK peripheral.

Author:
MCD Application Team
Version:
V2.3.0
Date:
16-June-2017
Attention:

© COPYRIGHT 2014 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file stm8s_clk.c.

STM8 Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM8 8-bit Microcontrollers platform visit www.st.com