What are the STM32s?

The STM32 family is a 32-bit microcontroller from ST 's ARM Cortex-M3 core specifically designed for embedded applications requiring high performance, low cost, and low power . Divided into different products by kernel architecture:

Among them, STM32F series include: STM32F103 "Enhanced" series, STM32F101 "Basic" series, STM32F105, STM32F107 "Connected" series

The enhanced series clock frequency reaches 72MHz, which is the highest performance in its class. The basic clock frequency is 36MHz. It is a 16-bit product with a significantly higher performance than a 16-bit product. It is the best choice for 32-bit users. Both series have built-in 32K to 128K flash memory, the difference being the combination of the maximum capacity of the SRAM and the peripheral interface. When the clock frequency is 72MHz, the code is executed from the flash memory. The STM32 consumes 36mA, which is equivalent to 0.5mA/MHz.

Prior to the STM32F105 and STM32F107 interconnected series of microcontrollers, STMicroelectronics has introduced the STM32 basic series, enhanced series, USB basic series, and complementary series; the new series follows the enhanced series of 72MHz processing frequency. Memory includes 64KB to 256KB of flash and 20KB to 64KB of embedded SRAM. The new series is available in LQFP64, LQFP100 and LFBGA100 packages. Different packages maintain pinout consistency. Combined with the design philosophy of the STM32 platform, developers can re-optimize functions, memory, performance and pin count by selecting products with minimal Hardware changes to meet individual application needs.

What are the outside of stm32?

Peripherals refer to peripheral functional modules external to the microcontroller, such as keyboard control chips, liquid crystals, A/D conversion chips, and so on. Peripherals can be controlled by the I/O, SPI, I2C and other buses of the microcontroller.

Common stm32 peripherals: basic IO, timer TIM, serial USART, ADC analog-to-digital conversion, DAC digital-to-analog conversion, SPI serial communication, EXIT external interrupt, BKP backup data, RTC alarm clock SysTIck system tick, WDG watchdog (independent + window), DMA transfer data, on-chip FLASH programming, FSMC read and write external SRAM, external NorFlash operation, etc.

Initialization and setup of the stm32 peripheral:

Before setting a peripheral, you must call one of the following functions to enable its clock.

RCC_AHBPeriphClockCmd(RCC_AHBPeriph_PPPx, ENABLE);

1. Declare a structure PPP_InitTypeDef in the main application file, for example: PPP_InitTypeDef

PPP_InitStructure;

2. Fill in the allowed values ​​for each structure member of the variable PPP_InitStructure. The following two methods are available:

a) PPP_InitStructure.member1 = val1;

b) PPP_StrucTInit(&PPP_InitStructure) PP_InitStructure.memberX = valX;

3, call the function PPP_Init () to initialize the peripheral PPP;

4. In this step, the peripheral PPP has been initialized. The function PPP_Cmd() can be called to enable it.

Steps to use STM32 peripherals

1, PPP_Init () function, its function is to initialize the peripheral PPP according to the parameters specified in PPP_InitTypeDef, such as TIM_Init () named PPP_DeInit () function, its function is to reset all registers of peripheral PPP to the default value.

2, PPP_StructInit () function, its function is to define the functions of the peripheral by setting various parameters in the PPP_InitTypeDef structure, for example: USART_StructInit()

3, PPP_Cmd () function, its function is to enable or disable peripheral PPP, for example: SPI_Cmd

4, PPP_ITConfig () function, its function is to enable or disable the interrupt source from the peripheral PPP, for example: RCC_ITConfig

5, PPP_DMAConfig () function, its function is to enable or disable the PPP DMA interface

6, PPP_GetFlagStatus () function, its function is to check whether the peripheral PPP flag is set or not

7, PPP_ClearFlag () function, its function is to clear the peripheral PPP flag, for example: I2C_ClearFlag.

8, PPP_GetITStatus () function, its function is to determine whether the interrupt from the peripheral PPP occurs or not

9, PPP_ClearITPendingBit () function, its function is to clear the peripheral PPP interrupt pending flag

The above is the entire content of this article.

Banknote Value Counting Machine Two CIS

Banknote Value Counting Machine,Banknote Value Counting Machine Two CIS,Two CIS

Suzhou Ribao Technology Co. Ltd. , https://www.ribaoeurope.com

This entry was posted in on