开源改变世界

当步进电机驱动器的输出引脚发生变化时,它会从一些旧引脚提供固定输出。 #69

推推 grbl 3年前 (2023-02-10) 260次浏览
关闭
Abdssmtzl 打开了这个问题 2021 年 6 月 29 日 · 3条评论
关闭

评论

当步进电机驱动器的输出引脚发生变化时,它会从一些旧引脚提供固定输出。 #69
Abdssmtzl 评论了 2021 年 6 月 29 日  

你好,

  First of all, thank you for sharing such an excellent project. I wanted to make a few changes to add a touchscreen to your project but there were some issues with pin changes.
  I was able to adapt your source file to STM32F429ZIT Discovery. However, in order to use the touch screen, I need to change the location of the stepper motor driver pins and limits. To begin with, I changed the stepper motor pins. There was no problem in its operation, but even though the old stepper motor pins were canceled, I get constant high outputs after installing the program from some of them.

我只从 GPIO.h 文件更改了引脚。

高输出引脚:PA8、A10、B4
新增输出引脚依次为(stepX、DIRX、Sy、Dy、Sz、Dz);D11,D4,D5,D7,D2,D13

注:笔者选择的引脚在定义时,当我按住处理器的reset键时,pin change中给高电平输出的引脚给高电平输出。我希望我解释得很好。

新的限位引脚顺序为:E4,E5,F6,G2,G9,G3 (x1,x2,y1,y2,z1,z2)

  Finally, when changing the limits, is there anything I should pay attention to when choosing a different empty timer pin instead of TIM4(B6)?

          Thank you for your interest. 
当步进电机驱动器的输出引脚发生变化时,它会从一些旧引脚提供固定输出。 #69

您好,
在 GPIO.c 和 TIM.c 中,引脚仅被初始化。您必须搜索代码以查看它们的使用位置。目前还没有完整的抽象层可用。

当步进电机驱动器的输出引脚发生变化时,它会从一些旧引脚提供固定输出。 #69
作者

变化 1:使用 STM32F429ZIT Discovery KIT。
问题一:当按下复位脚时,3脚输出高电平。

更改 2:虽然定义了新的步进电机驱动器输入引脚,但从 GPIO.c 和 GPIO.h 文件中删除了旧引脚。
问题 2:删除的定义中的 3 个给出了恒定的高输出。新引脚没有问题。

解决方案 2: 我认为删除的引脚可能被定义为处理器中的输入。删除的引脚定义在 GPIO.c 文件中定义。没有对 GPIO.h 文件进行任何添加。它不再输出高电平。但是当复位引脚为高电平时,旧的 3 个步进驱动器引脚会输出高电平。新引脚目前没有问题。

变化3:更换限位销没有问题。

高输出管脚:PA8、A10、B4

当步进电机驱动器的输出引脚发生变化时,它会从一些旧引脚提供固定输出。 #69

未使用的引脚默认为浮动输入
但是由于您修改了源代码我不知道您的问题