完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我想在我的电机归位时启用HardStop中断(即SW_MODE = 0),然后在之后禁用它,以便随后的移动不会触发中断。在通过GoUntil和ReleaseSW开始归位之前启用中断可以正常工作。我检查了STATUS和CONFIG寄存器以确认没有任何故障条件,并且当我发送命令以启用硬停止中断时SW_MODE位被清除。
在调用GoUntil或ReleaseSW之后,我的每次设置SW_MODE的命令都失败了。我在STATUS寄存器中得到一个NOTPERF_CMD错误标志,正如预期的那样,未设置SW_MODE位。 到目前为止,我可以设置SW_MODE的唯一方法是*之后*我使用任何禁用桥的HiZ命令。但是,这不是我想要的,因为当桥梁被禁用时轴会掉落! 奇怪的是,在归位之后,在一段未知的时间之后,我可以发送命令来设置SW_MODE并且它不会产生NOTPERF_CMD标志。 任何人都可以推荐用于确定为什么我在GoUntil或ReleaseSW之后立即获得NOTPERF_CMD的策略? #notperf_cmd#l6470 #sw_mode 以上来自于谷歌翻译 以下为原文 I'd like to enable the HardStop interrupt (i.e. SW_MODE = 0) when I home my motor and then disable it afterward so that subsequent moves do not trigger the interrupt. Enabling the interrupt before I start homing via GoUntil and ReleaseSW work fine. I checked the STATUS and CONFIG registers to confirm that there aren't any fault conditions, and that the SW_MODE bit is cleared when I send my command to enable the hardstop interrupt. Following any call to GoUntil or ReleaseSW, my command to set SW_MODE fails every time. I get a NOTPERF_CMD error flag in the STATUS register and as expected, the SW_MODE bit is not set. So far, the only way I can set SW_MODE is *after* I use any HiZ command that disables the bridges. However, this is not what I want because the axis will drop when the bridges are disabled! What is strange is that after homing, and after some unknown period of time, I can send a command to set SW_MODE and it doesn't result in a NOTPERF_CMD flag. Can anyone recommend strategies for determining why I'm getting NOTPERF_CMD immediately after GoUntil or ReleaseSW? #notperf_cmd #l6470 #sw_mode |
|
相关推荐
2个回答
|
|
|
嗨,
CONFIG寄存器被“保护”,如果功率级被使能,则无法写入(参见数据表)。 为了获得您描述的行为,您可以使用FLAG输出作为中断器检测SW下降沿,并在检测到事件时发送HardStop命令。 问候 恩里科 以上来自于谷歌翻译 以下为原文 Hi, the CONFIG register is ''protected'' and you cannot write it if the power stage is enabled (see datasheet). In order to obtain the behavior you described you could detect the SW falling-edge using the FLAG output as an interrupr and send an HardStop command when the event is detected. Regards Enrico |
|
|
|
|
|
感谢您的回复,恩里科。这基本上就是我认为的问题,但令我感到困惑的是,在我运行的测试的其他地方,我能够通过限位开关驱动电机,这意味着SW_MODE在某些时候被禁用了......但是如果桥梁被禁用,那么轴线就会下降,而这种情况并没有发生。我会再研究一下!
以上来自于谷歌翻译 以下为原文 Thank you for your response, Enrico. That's basically what I figured was the problem, but what confused me was that elsewhere in the tests that I run, I'm able to drive the motor past the limit switch, which means that the SW_MODE was disabled at some point... but if the bridges were disabled, the axis would have fallen, and that didn't happen. I'll look into it some more! |
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1453 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1502 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3649 浏览 1 评论
3842 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2461 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
727浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
661浏览 5评论
710浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
941浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
745浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 01:18 , Processed in 0.741428 second(s), Total 76, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1308