当前位置:网站首页>STM32HAL库修改Hal_Delay为us级延时
STM32HAL库修改Hal_Delay为us级延时
2022-07-31 04:17:00 【公子 魏】
STM32HAL库修改Hal_Delay为us级延时
前提
- STM32CudeMX 生成的文件(最好)
- 带系统的时钟和不带系统的注意时钟的分配
- 改写前需要测试Hal_Delay在正常情况下可以进行MS级延时
说明
这个修改是我在FreeRTOS下进行的测试,原理上是一样的 。
这个相比于正点原子的解决方案,我个人感觉会通用、简单、可靠、许多。
目前测试没有发现什么问题,如果大家在使用的过程中发现了什么问题欢迎留言
需要修改的代码
- stm32f4xx_hal.c,红圈部分为需要修改的代码。
- stm32f4xx_hal.h, 在红圈中添加这段代码
HAL_TICK_FREQ_1HZ = 1000U,
stm32f4xx_hal.c

stm32f4xx_hal.h

边栏推荐
- 【AUTOSAR-RTE】-4-Port and Interface and Data Type
- log level and print log note
- Based on the local, linking the world | Schneider Electric "Industrial SI Alliance" joins hands with partners to go to the future industry
- errno错误码及含义(中文)
- IDEA common shortcut keys and plug-ins
- 开放原子开源基金会秘书长孙文龙 | 凝心聚力,共拓开源
- (八)Math 类、Arrays 类、System类、Biglnteger 和 BigDecimal 类、日期类
- RESTful api interface design specification
- ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
- 数字经济时代的开源数据库创新 | 2022开放原子全球开源峰会数据库分论坛圆满召开
猜你喜欢

BP神经网络

idea工程明明有依赖但是文件就是显示没有,Cannot resolve symbol ‘XXX‘

扫雷游戏(c语言写)

Understanding and Using Unity2D Custom Scriptable Tiles (4) - Start to build a custom tile based on the Tile class (below)
![[Paper reading] Mastering the game of Go with deep neural networks and tree search](/img/4f/899da202e13bd561bbfdbaeebe4d2e.jpg)
[Paper reading] Mastering the game of Go with deep neural networks and tree search

mysql数据库安装(详细)

LocalDate addition and subtraction operations and comparison size

IDEA常用快捷键与插件

MySQL数据库备份

递归实现汉诺塔问题
随机推荐
[Paper reading] Mastering the game of Go with deep neural networks and tree search
Win10 CUDA CUDNN 安装配置(torch paddlepaddle)
Based on the local, linking the world | Schneider Electric "Industrial SI Alliance" joins hands with partners to go to the future industry
Redis uses sorted set to cache latest comments
ERROR 2003 (HY000) Can‘t connect to MySQL server on ‘localhost3306‘ (10061)
VScode+ESP32 quickly install ESP-IDF plugin
MySQL数据库安装配置保姆级教程(以8.0.29为例)有手就行
Summary of Huawei Distributed Storage FusionStorage Knowledge Points [Interview]
Daily practice of LeetCode - palindrome structure of OR36 linked list
三子棋的代码实现
[CV project debugging] CUDNN_CONVOLUTION_FWD_SPECIFY_WORKSPACE_LIMIT problem
强化学习:从入门到入坑再到拉屎
论治理与创新 | 2022开放原子全球开源峰会OpenAnolis分论坛圆满召开
[Swift]自定义点击APP图标弹出的快捷方式
端口排查步骤-7680端口分析-Dosvc服务
开放原子开源基金会秘书长孙文龙 | 凝心聚力,共拓开源
安全20220709
扫雷游戏(c语言写)
No qualifying bean of type question
微信小程序使用云函数更新和添加云数据库嵌套数组元素