How to use and customize the library
Figure 7: How to run a peripheral example󳘪
2.5 STM32F30/31xx programming model using the library
This chapter contains useful general information for using the library to develop application
based on STM32F30/31xx devices. It describes in details the sequence to use a peripheral,
from the configuration of the system to the configuration of the peripheral registers.
After reset the device is running from Internal High Speed oscillator (HSI 8 MHz) with 0
Flash wait state, Flash prefect buffer, D-Cache and I-Cache disabled, and all peripherals
off except internal SRAM, Flash and JTAG:
ï‚· There is no prescaler on High speed (AHB) and Low speed (APB) buses. All the
peripherals mapped on these buses are running at HSI speed.
ï‚· The clock for all peripherals is switched off, except for SRAM and FLASH.
ï‚· All GPIOs are in input floating state, except for JTAG pins which are assigned to
debug.󳘪 Once the device started from reset, the user application has to configure the
system clock and all peripheral hardware resources (GPIO, Interrupt, DMA…) .