Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Update drv_pwm.c #3607
Open
Update drv_pwm.c #3607
Conversation
修复在STM32F103C8TX下,PWM 无法正常输出波形。
| @@ -322,6 +322,15 @@ static rt_err_t stm32_hw_pwm_init(struct stm32_pwm *device) | |||
| #if defined(SOC_SERIES_STM32F1) || defined(SOC_SERIES_STM32L4) | |||
| tim->Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; | |||
| #endif | |||
|
|
|||
| #if defined(SOC_STM32F103C8TX) | |||
SummerLife
May 18, 2020
Member
感谢贡献代码,对于本次提交,我有如下两点建议:
首先,我们一般不会对某一个指定型号的芯片来修改驱动代码,一般是对应于某个系列,比如 F1 系列,由于 HAL 的兼容性,这样做是没有问题的。
第二点,你可以参考一下这个 ISSUE,然后检查一下本次修改是否也会造成同样的问题。
感谢贡献代码,对于本次提交,我有如下两点建议:
首先,我们一般不会对某一个指定型号的芯片来修改驱动代码,一般是对应于某个系列,比如 F1 系列,由于 HAL 的兼容性,这样做是没有问题的。
第二点,你可以参考一下这个 ISSUE,然后检查一下本次修改是否也会造成同样的问题。
|
请根据建议完善相关提交代码 |
|
@SummerLife 我看了之前我修改的PR,这里主要是因为CubeMX的兼容性导致的差异,我在L4上生成出来的有独立的PWM初始化接口HAL_TIM_PWM_MspInit,但是在F2上又没有生成。 |
|
@SummerLife 慎重考虑下这份PR,貌似确实存在这样的情况,如果这份PR确实时间久了推动不下去,请自行fix然后发出PR出来。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
修复在STM32F103C8TX下,PWM 无法正常输出波形。
拉取/合并请求描述:(PR description)
[
在STM32F103C8T芯片上,使用PWM无法正常输出,在drv_pwm_.c 的stm32_hw_pwm_init函数内增加HAL_TIM_Base_Init即可正常输出PWM信号,在STM32F103C8T6核心板上验证成功。
]
以下的内容不应该在提交PR时的message修改,修改下述message,PR会被直接关闭。请在提交PR后,浏览器查看PR并对以下检查项逐项check,没问题后逐条在页面上打钩。
The following content must not be changed in submitted PR message. Otherwise, the PR will be closed immediately. After submitted PR, please use 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