Back to main page

STM32F10x Standard Peripherals Library

Peripheral’s Drivers Description


Copyright 2010 STMicroelectronics



STM32F10x Standard Peripheral's Library Architecture

The following figure provides a global view of the STM32F10x Standard Peripherals Library usage and interaction with other firmware conponents.

  Back to Top

Description of the STM32F10x Standard Peripheral's Drivers files

The Standard Peripherals library file inclusions relationship is shown in the following figure:

Each peripheral has a source code file stm32f10x_ppp.c and a header file stm32f10x_ppp.h. The stm32f10x_ppp.c file contains all the firmware functions required to use the PPP peripheral.
A single memory mapping file, stm32f10x.h, is supplied for all peripherals. It contains all the register declarations and bits definition.
This is the only file that needs to be included in the user application to interface with the library.
The stm32f10x_conf.h file is used to specify the set of parameters to interface with the library drivers before running any application.

The table bellow lists and describes the different files used by the Standard Peripherals library:

File name



Peripheral’s drivers configuration file
The user can enable or disable peripheral header file inclusion by using the template
This file can also be used to enable or disable the Library run-time failure detection before compiling the firmware library drivers, through the preprocessor define USE_FULL_ASSERT


Header file of PPP peripheral
This file includes the PPP peripheral function and variable definitions used within these functions.


Driver source code file of PPP peripheral written in C language


Header file including all interrupt handlers prototypes


Template source file containing the interrupt service routine (ISR) for CortexM3 exceptions. User can add additional ISR(s) for the used peripheral(s) (for the available peripheral interrupt handler's name, please refer to the startup file startup_stm32f10x_xx.s).

  Back to Top

Description of the STM32F10x CMSIS files

The table below lists and describes the different STM32F10x CMSIS files:

File name



CMSIS Cortex-M3 STM32F10xxx device peripheral access layer header file.

The file is the unique include file that the application programmer is using in the C source code, usually in main.c. This file contains:

  • configuration section that allows to select:

-  the device used in the target application

             -  to use or not the peripheral’s drivers in application code (i.e. code will be based on direct
                access to peripheral’s registers rather than drivers API) , this option is controlled by the
                #define USE_STDPERIPH_DRIVER
             -  to change few application-specific parameters such as the HSE crystal frequency

  • data structures and the address mapping for all peripherals
  • peripheral's registers declarations and bits definition
  • macros to access peripheral’s registers hardware


CMSIS Cortex-M3 STM32F10xxx device peripheral access layer system header file.


CMSIS Cortex-M3 STM32F10xxx device peripheral access layer system source file.


Connectivity line devices startup file.


XL-density devices startup file.


High-density devices startup file.


High-density Value line devices startup file.


Medium density devices startup file.

startup_stm32f10x_md_vl.s Medium density Value line devices startup file.


Low-density devices startup file.

startup_stm32f10x_ld_vl.s Low-density Value line devices startup file.

For more details please refer to CMSIS documentation .


For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit