STM32 timer timing calculation formula

Publisher:Tiger8Latest update time:2019-01-02 Source: eefocusKeywords:STM32 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Tout = ((arr+1)*(psc+1))/Tclk;


in:


Tclk: Timer input clock frequency (unit: MHZ)


Tout: Timer overflow time (unit: us)


  .TIM_Period = arr; eg; 4999


  .TIM_Prescaler = psc; eg: 7199




  Tout = ((4999+1) × (7199+1))/72 = 500000us = 500ms.



Keywords:STM32 Reference address:STM32 timer timing calculation formula

Previous article:Summary of serial communication of STM32F107
Next article:System tick timer usage in stm32

Recommended ReadingLatest update time:2024-11-16 13:40

STM32 push-pull output and open-drain output
The IO port circuit of stm32 is shown in the figure above: The so-called push-pull output: when the output is high level, the P-MOS tube is turned on; when the output is low level, the N-MOS tube is turned on. The two tubes are turned on in turn, one is responsible for sinking current and the other is responsible fo
[Microcontroller]
STM32 push-pull output and open-drain output
STM32 watchdog configuration
The configuration of the watchdog consists of two parts: initialization of the watchdog and feeding the watchdog. Let's take a look at how STM32 initializes the watchdog and feeds the dog. Watchdog initialization steps: 1. The IWDG_PR and IWDG_RLR registers have a write protection function. To modify the values ​​
[Microcontroller]
Boot0 and boot1 of stm32
The storage media corresponding to the three startup modes of STM32 are all built-in to the chip, they are: 1) User Flash = Flash built into the chip. 2) SRAM = RAM area built into the chip, which is the memory. 3) System Memory = A specific area inside the chip. A Bootloader is pre-installed in this area when the
[Microcontroller]
Distinguish between long press and short press of keys triggered by stm32 software
/* ------------------------------------------------------------------------------------------------  * @fn KeyCoolPressTimeHandle  *  * @brief key detection  *  * @param       none  *  * @return      none  **************************************************************************************************  */ uint8_t Ke
[Microcontroller]
STM32 single timer four-channel capture function implementation
Input capture, as a function of the timer, is widely used in industrial speed measurement. Some timers of STM32 have four external channels, and one timer can be used to collect the frequency of four external pulses, saving hardware resources and software code. If you need to measure the frequency of one or more exter
[Microcontroller]
STM32 GPIO initialization steps
1. Enable GPIO clock: RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState); Parameter Description: For example: 2. Set GPIO parameters: output OR input, working mode, port flip rate; 3. Call the initialization function: GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct);
[Microcontroller]
STM32 GPIO initialization steps
stm32 hardware IIC use
In many posts, I saw that many people use simulated I2C when using I2C devices, because ST designed it to be difficult to use in order to circumvent patents! I also tried the officially generated I2C today, using the I2C generated by CUBEMX. I also encountered some minor problems after the generation. I posted it here
[Microcontroller]
stm32 hardware IIC use
Design of intrinsically safe power supply for mines based on STM32
Intrinsically safe power supply is an important part of intrinsically safe electrical equipment. Due to the mechanization of coal mines, the power supply, communication and alarm of underground sensors, bend alarms and other equipment all require power supply equipment. However, based on the
[Power Management]
Design of intrinsically safe power supply for mines based on STM32
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号