GlobLib
HAL and API libraries for MCUs and hardware.
|
This module contains low level functions modifying clock parameters. More...
Files | |
file | stm32f103cb_clock.h |
Header file for stm32f103 CLOCK. | |
Enumerations |
Functions | |
mcu_error | CLOCK_setSpeed (clock_option option) |
Set the final clock speed of the device. More... | |
uint32_t | CLOCK_getSpeed (void) |
Get the current clock speed of the device. More... | |
uint32_t | CLOCK_getSpeedAlternate (void) |
Get the current clock speed of the alternate bus. More... | |
This module contains low level functions modifying clock parameters.
The STM32f1 has a maximum clock speed of 72MHz for external oscillator and 64MHz for intenal.
By default, on startup, the clock is set to internal oscillator with 8MHz frequency.
enum clock_option |
Clock configuration available for MCU.
This doesn't represent all clock options available, further options can be utalised with libopencm3 firmware
Definition at line 54 of file stm32f103cb_clock.h.
uint32_t CLOCK_getSpeed | ( | void | ) |
Get the current clock speed of the device.
Definition at line 57 of file stm32f103cb_clock.c.
uint32_t CLOCK_getSpeedAlternate | ( | void | ) |
Get the current clock speed of the alternate bus.
Definition at line 63 of file stm32f103cb_clock.c.
mcu_error CLOCK_setSpeed | ( | clock_option | option | ) |
Set the final clock speed of the device.
If this function isn't used, the default internal oscillator, 8Mhz
option | The clock speed option to use defined by clock_option |
Definition at line 19 of file stm32f103cb_clock.c.