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

Description

stm32f10x_conf.h

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

stm32f10x_ppp.h

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

stm32f10x_ppp.c

Driver source code file of PPP peripheral written in C language

stm32f10x_it.h

Header file including all interrupt handlers prototypes

stm32f10x_it.c

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

Description

stm32f10x.h

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

system.stm32f10x.h

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

system.stm32f10x.c

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

startup_stm32f10x_cl.s

Connectivity line devices startup file.

startup_stm32f10x_xl.s

XL-density devices startup file.

startup_stm32f10x_hd.s

High-density devices startup file.

startup_stm32f10x_hd_vl.s

High-density Value line devices startup file.

startup_stm32f10x_md.s

Medium density devices startup file.

startup_stm32f10x_md_vl.s Medium density Value line devices startup file.

startup_stm32f10x_ld.s

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 www.st.com/STM32