Skip to content
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

新电调用旧代码不能正常初始化 #11

Open
xxyyttxx opened this issue Dec 30, 2017 · 4 comments
Open

新电调用旧代码不能正常初始化 #11

xxyyttxx opened this issue Dec 30, 2017 · 4 comments

Comments

@xxyyttxx
Copy link

xxyyttxx commented Dec 30, 2017

问题在于,F411完成PWM的初始化时间太慢且不固定(在USB供电和E5V供电的时候不同)。
bug

推测原因:外部供电的时候,STLINK初始化后会给F411 一个reset信号(具体要看STLINK手册);
解决方案:可以把NUCLEO板子上的CN2拔掉(相当于断开STLINK和F411的连接),就能正常用了。但是这样的话,想要调试又要把跳线帽接回去。

如何方便的不让STLINK工作。。

@xxyyttxx
Copy link
Author

xxyyttxx commented Dec 30, 2017

调试过程中有一个版本的,思路是覆盖Reset_Handler(),把PPL的初始化放在电调量程确定之后。
但是没有配置好时钟,下次再尝试。

@xxyyttxx
Copy link
Author

  • 另一个思路:只配置一次油门量程,而不用每次都设置(直接延时等待自检)。
    screen shot 2017-12-30 at 8 06 40 pm
    screen shot 2017-12-30 at 8 06 36 pm

xxyyttxx added a commit that referenced this issue Dec 31, 2017
@xxyyttxx
Copy link
Author

最终解决方案:两次初始化电调

@xxyyttxx xxyyttxx reopened this Jan 2, 2018
@xxyyttxx
Copy link
Author

xxyyttxx commented Jan 2, 2018

间隔1s的按黑色reset按钮可以绕开这个问题。

xxyyttxx added a commit that referenced this issue Jan 2, 2018
#11 暂时没有好的解决方法。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant