当前位置:网站首页>Stm32--- systick timer
Stm32--- systick timer
2022-07-05 08:16:00 【chen_ bx】
STM32---Systick Timer
Systick Timer interrupt service function implementation LED Light out
mian Call in function SysTick_Config Function to configure timer ,SystemCoreClock Is frequency ,stm32f103 frequency 72M.
t=reload * (1/SystemCoreClock) Calculation time formula
SysTick_Config The parameter passed in the function is reload
SystemCoreClock = 72M,reload=72 when , t=72 * (1/72M)=1 us
SystemCoreClock = 72M,reload=72000 when , t=72000 * (1/72M)=1 ms
SystemCoreClock/1000 = 72000 = reload (1ms)
SysTick_Config(SystemCoreClock/1000);//1ms
//SysTick_Config(72000);
stay stm32f10x_it.c Find SysTick_Handler Write interrupt service function , Realization 500ms Flip LED state
void SysTick_Handler(void)
{
static uint32_t i=0;
i++;
if(i>500){
i = 0;
LED_YELLOW_TOGGLE;
}
}
边栏推荐
- C language # and #
- [trio basic from introduction to mastery tutorial XIV] trio realizes unit axis multi-color code capture
- What are the test items of power battery ul2580
- Void* C is a carrier for realizing polymorphism
- Measurement fitting based on Halcon learning [III] PM_ measure_ board. Hdev routine
- Explain task scheduling based on Cortex-M3 in detail (Part 2)
- Some thoughts on extracting perspectives from ealfa and Ebeta
- How to define guid in AMI code
- Programming knowledge -- basis of C language
- Basic embedded concepts
猜你喜欢
Makefile application
Relationship between line voltage and phase voltage, line current and phase current
Tailq of linked list
C#,数值计算(Numerical Recipes in C#),线性代数方程的求解,LU分解(LU Decomposition)源程序
Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine
NTC thermistor application - temperature measurement
Programming knowledge -- assembly knowledge
Brief discussion on Buck buck circuit
QEMU STM32 vscode debugging environment configuration
VESC Benjamin test motor parameters
随机推荐
Live555 push RTSP audio and video stream summary (I) cross compilation
VESC Benjamin test motor parameters
Sql Server的存储过程详解
MHA High available Cluster for MySQL
Gradle复合构建
Shape template matching based on Halcon learning [v] find_ cocoa_ packages_ max_ deformation. Hdev routine
Design a clock frequency division circuit that can be switched arbitrarily
Step motor generates S-curve upper computer
Matlab2018b problem solving when installing embedded coder support package for stmicroelectronic
List of linked lists
Extern keyword function
MySQL MHA high availability cluster
Baiwen 7-day smart home learning experience of Internet of things
Interview catalogue
Detailed summary of FIO test hard disk performance parameters and examples (with source code)
Negative pressure generation of buck-boost circuit
Anonymous structure in C language
UE像素流,来颗“减肥药”吧!
Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine
Why is 1900 not a leap year