Clever Geek Handbook
📜 ⬆️ ⬇️

STM32F10x Standard Peripherals Library

STM32F10x Standard Peripherals Library (abbreviated STM32F10x SPL) is a library created by STMicroelectronics in the C language for its microcontrollers of the STM32F10x family. It contains functions, structures and macros to facilitate the work with the peripherals of the microcontroller. The library is documented, includes examples for each peripheral device, fully supports CMSIS ( Cortex-M3 kernel code [1] , developed by ARM, is included in the distribution package). The library distribution is available for free download (21 MB) . Latest version of the library: 3.5.0.

Moreover, it includes the ARM CMSIS library version 1.30, while the latest version of CMSIS, released by ARM at the moment, is 3.01. Since version 1.30, several important corrections have been made in CMSIS [2] , including the correction of the error "registers may not be the same -` strexh r0, r0, [r1] '". To resolve this and other errors, it is recommended that you update CMSIS yourself.

Naming Conventions

  1. PPP - designation of a peripheral device, such as ADC (analog-to-digital converter)
  2. Library source code files begin with the prefix stm32f10x_ .
  3. The names of the constants are written in capital letters. If a constant is used in a single file, then it is defined in this file. The constant used in more than one file is defined in the header file.
  4. The names of the registers, as well as constants, are written in capital letters. Registers are named in the same way as in the documentation for microcontrollers.
  5. Function names begin with PPP , followed by one underscore. Next are the merged words starting with a capital letter. For example: USART_SendData () .
  6. To configure the PPP periphery, the PPP_Init () function is used, into which a pointer to a PPP_InitTypeDef type structure containing peripheral settings is passed.
  7. The PPP_DeInit () function resets peripheral registers to their initial state.
  8. The PPP_StructInit () function fills the structure fields of the PPP_InitTypeDef type with default values ​​that describe the initial state of the periphery (state after reset).
  9. The PPP_Cmd () function enables or disables peripherals.
  10. The PPP_ITConfig () function enables or disables interrupts.
  11. The PPP_DMAConfig () function enables or disables the DMA interface.
  12. Functions ending in Config configure individual peripheral functions. For example, GPIO_PinRemapConfig () .
  13. The PPP_GetFlagStatus () function is used to get the status of flags.
  14. The PPP_ClearFlag () function resets flags.
  15. The PPP_GetITStatus () function reports whether an interrupt has occurred or not.
  16. The PPP_ClearITPendingBit () function resets the interrupt capture bit.


Source - https://ru.wikipedia.org/w/index.php?title=STM32F10x_Standard_Peripherals_Library&oldid=90390434


More articles:

  • The Quiet Resistance
  • Grand Prix of Mexico
  • Dollman, John
  • Battle Hymn
  • Duck Season
  • Modern Pentathlon at the 1968 Summer Olympics
  • Jan Halvarsson
  • SL (2, R)
  • Coat of arms of Dalnegorsk
  • Thirst (film, 1957)

All articles

Clever Geek | 2019