当前位置:网站首页>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;
}
}
边栏推荐
- Volatile of C language
- [trio basic tutorial 18 from introduction to proficiency] trio motion controller UDP fast exchange data communication
- Gradle复合构建
- Ble encryption details
- [tutorial 15 of trio basic from introduction to proficiency] trio free serial communication
- UEFI development learning 4 - getting to know variable services
- Working principle and type selection of common mode inductor
- Take you to understand the working principle of lithium battery protection board
- Problem solving: interpreter error: no file or directory
- Halcon's practice based on shape template matching [1]
猜你喜欢
Arduino uses nrf24l01+ communication
[trio basic tutorial 18 from introduction to proficiency] trio motion controller UDP fast exchange data communication
FIO测试硬盘性能参数和实例详细总结(附源码)
Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine
Shape template matching based on Halcon learning [VII] reuse_ model. Hdev routine
Management and use of DokuWiki
C, Numerical Recipes in C, solution of linear algebraic equations, LU decomposition source program
STM32 single chip microcomputer - bit band operation
Shell script basic syntax
DCDC circuit - function of bootstrap capacitor
随机推荐
Gradle composite construction
Consul installation
Summary of SIM card circuit knowledge
Simple design description of MIC circuit of ECM mobile phone
Halcon's practice based on shape template matching [1]
C, Numerical Recipes in C, solution of linear algebraic equations, LU decomposition source program
Introduction of air gap, etc
Live555 push RTSP audio and video stream summary (I) cross compilation
Circleq of linked list
Explain task scheduling based on Cortex-M3 in detail (Part 2)
Detailed explanation of SQL server stored procedures
My-basic application 1: introduction to my-basic parser
Step motor generates S-curve upper computer
Let's briefly talk about the chips commonly used in mobile phones - OVP chips
[trio basic from introduction to mastery tutorial 20] trio calculates the arc center and radius through three points of spatial arc
UEFI development learning series
Halcon's practice based on shape template matching [2]
On boost circuit
Hardware 3 -- function of voltage follower
FIO测试硬盘性能参数和实例详细总结(附源码)