Arm Community
Arm Community
  • Site
  • User
  • Site
  • Search
  • User
  • Groups
    • Research Collaboration and Enablement
    • DesignStart
    • Education Hub
    • Innovation
    • Open Source Software and Platforms
  • Forums
    • AI and ML forum
    • Architectures and Processors forum
    • Arm Development Platforms forum
    • Arm Development Studio forum
    • Arm Virtual Hardware forum
    • Automotive forum
    • Compilers and Libraries forum
    • Graphics, Gaming, and VR forum
    • High Performance Computing (HPC) forum
    • Infrastructure Solutions forum
    • Internet of Things (IoT) forum
    • Keil forum
    • Morello Forum
    • Operating Systems forum
    • SoC Design and Simulation forum
    • 中文社区论区
  • Blogs
    • AI and ML blog
    • Announcements
    • Architectures and Processors blog
    • Automotive blog
    • Graphics, Gaming, and VR blog
    • High Performance Computing (HPC) blog
    • Infrastructure Solutions blog
    • Innovation blog
    • Internet of Things (IoT) blog
    • Operating Systems blog
    • Research Articles
    • SoC Design and Simulation blog
    • Tools, Software and IDEs blog
    • 中文社区博客
  • Support
    • Arm Support Services
    • Documentation
    • Downloads
    • Training
    • Arm Approved program
    • Arm Design Reviews
  • Community Help
  • More
  • Cancel
中文社区
中文社区
中文社区博客 STM32F429ZIT6U-SysTick
  • Blogs
  • Forum
  • 视频和文件
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • Jump...
  • Cancel
  • New
中文社区 requires membership for participation - click to join
More blogs in 中文社区
  • ARM中国大学计划博客

  • Arm新闻

  • 中文mbed博客

  • 中文社区博客

  • 恩智浦汽车电子MCU讨论区博客

 

Tags
  • chinese
  • 中文
  • STM32
Actions
  • RSS
  • More
  • Cancel
Related blog posts
Related forum threads

STM32F429ZIT6U-SysTick

dd
dd
June 3, 2016
Less than one minute read time.

SysTick—系统定时器是属于ARM内核中的一个外设,内嵌在NVIC中,

一个24bit的向下递减的计数器,计数器每计数一次的时间为1/SYSCLK。

SysTick—系统定时有4个寄存器,如下图,详细参考CM4内核编程手册(英文)http://pan.baidu.com/s/1nuSg8fn

SysTick.PNG

有的时候程序需要用比较精确的延时,所以编写一个精确的延时程序非常有必要,特别是在写一些对时序要求比较高的程序,比如模拟的SPI、IIC,STM32的硬件IIC和SPI 我用的不多,没怎么搞过。

一般的延时有纯软件延时、定时器延时、定时器中断延时。

1、软件延时由于ARM内核多级流水线的指令执行方式,比较难算出精确的延时时间。

以下两种较为精确

2、定时器延时

3、定时器中断延时

这次用了SysTick定时器分别尝试了定时器和定时器中断两种定时方法。效果差不多,感觉误差比想象中大了那么一点点。

定时器延时10us,IO口波形如下:

SysTick_nut.png

定时器延时1s,IO口波形如下:

SysTick_nt.png

定时器中断延时10us,IO口波形如下:

SysTick_ut.png

定时器中断延时1s,IO口波形如下:

SysTick_t.png

看波形感觉都差不多,定时器中断延时和定时器延时。都可以用,效果么就是闪灯咯,blinking blinking blinking 

Anonymous
中文社区博客
  • Arm A-Profile构架2022扩展

    Zenon Xiu (修志龙)
    Zenon Xiu (修志龙)
    原文:Arm A-Profile Architecture Developments 2022 - Architectures and Processors blog - Arm Community blogs - Arm Community  作者:Martin Weidmann翻译:修志龙(Zenon Xiu) 与arm构架授权和生态伙伴一起,arm持续演进其构架,开发新功能以满足现有和新市场的要求…
    • October 17, 2022
  • 深入理解 Arm A-profile的non-maskable interrupt -NMI

    Zenon Xiu (修志龙)
    Zenon Xiu (修志龙)
    原文: https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/a-profile-non-maskable-interrupts  翻译: 修志龙 Zenon Xiu Arm A-profile构架一个长久以来的局限性是:缺乏对non-maskable interrupt (NMI…
    • August 24, 2022
  • Arm A-Profile 构架2021扩展

    Zenon Xiu (修志龙)
    Zenon Xiu (修志龙)
    原文: https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-developments-2021 Martin Weidmann September 8, 2021 翻译注释:Zenon Xiu Arm与arm构架授权公司及生态伙伴一起…
    • August 17, 2022