-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix the tick of drv_common.c in stm32 bsp #5126
Conversation
unknown seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
在中断未开启或在比 SysTick_Handler 优先级更高的中断中调用 HAL库 的 API 中的 HAL_GetTick 返回的 tick 也会走,每调用一次 HAL_GetTick hal tick都会累加,会造成不准,不过感觉问题也不大。 |
两个unknown 用户提交 |
可能是龙伟的单位和家里用的不是一个git帐号? 合并的时候别点merge, 用squash吧 压缩成一个commit,merge按钮的旁边有一个下拉按钮,就能看见squash选项了。 |
这个操作并不能解决这个unknwon的问题,还是需要重新提交的 |
squash 会把龙伟的头像和unknown头像并在一起,这样就知道是一起提交的了。不用为了个用户名去折腾人家了吧。龙伟单位的电脑git貌似受限。回家提交就是正常的头像。 |
我晚上重新提交下 |
ok |
拉取/合并请求描述:(PR description)
[
SysTick_CTRL_COUNTFLAG_Msk
位来判断是否在中断或HAL_GetTick
中调用HAL_IncTick
SysTick_CTRL_COUNTFLAG_Msk
位读取就被复位,中断和HAL_GetTick
中判断就形成了互斥SysTick_Handler
优先级更高的中断中调用HAL库
的API
中的HAL_GetTick
返回的tick
也会走,而不会出现死循环的情况systick
使用SystemCoreClock
变量就好了,不需要不同型号都调不同的API
获取时钟源rt_hw_systick_init
放到HAL_InitTick
中,HAL_Init
和SystemClock_Config
都会调用它,没必要外部调用了HAL_SYSTICK_Config
中默认时钟源不分频,没必要HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK)
,还用宏限制型号]
以下的内容不应该在提交PR时的message修改,修改下述message,PR会被直接关闭。请在提交PR后,浏览器查看PR并对以下检查项逐项check,没问题后逐条在页面上打钩。
The following content must not be changed in the submitted PR message. Otherwise, the PR will be closed immediately. After submitted PR, please use a web browser to visit PR, and check items one by one, and ticked them if no problem.
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0
代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up