DRV10983驱动无刷电机调试过程与踩坑记录

本文记录了使用DRV10983驱动无刷电机过程中遇到的问题及解决方法。从PWM驱动失败开始,经过I2C通信和配置检查,最终通过官方开发板和GUI软件解决问题,实现电机正常运转。总结中强调在验证新驱动芯片时使用官方开发板的重要性。
摘要由CSDN通过智能技术生成

因为工作需要,目前在验证DRV10983这块驱动芯片是否能满足我们驱动无刷电机的需求。不出意料踩了坑,看了看官网论坛也有类似的问题,索性分享出来让大家少走点弯路。

 

1.问题描述

首先,我们来看看它的数据手册

看到可以直接通过PWM或者I2C输入控制电机,于是硬件交给我板子的时候说,“你接个PWM应该就能动了。”然后我输出了一路PWM波,接上去,它抖了一下,动了,转了。

然后10秒以后就停了。

咋回事啊?

2.原因分析

翻查数据手册,对比了一下,我输出的这路PWM波高低电平和频率都符合要求,输入的电压也没有问题。那么问题应该是在芯片这里了。或许应该使用i2c来写速度?

于是接了SDA和SCL出来连I2C,在正常通讯以后,也读到了相关的配置。

msh />pcf8574_sample 2 0 0
[38561] D/I2C: I2C bus dev [i2c1] writing 1 bytes.
[38566] D/I2C: msgs[0] W, addr=0x52, len=1
[38570] D/I2C: send start condition
[38574] D/I2C: ACK
[38576] D/I2C: ACK
[38578] D/I2C: write 1 byte
[38581] D/I2C: send stop condition
[38584] D/I2C: msgs[0] W, addr=0x52, len=2
[38589] D/I2C: send start condition
[38592] D/I2C: ACK
[38595] D/I2C: ACK
[38597] D/I2C: ACK
[38599] D/I2C: write 2 bytes
[38602] D/I2C: send stop condition
Success
[38606] D/I2C: msgs[0] W, addr=0x52, len=2
[38610] D/I2C: send start condition
[38614] D/I2C: ACK
[38616] D/I2C: ACK
[38618] D/I2C: ACK
[38621] D/I2C: write 2 bytes
[38623] D/I2C: send stop condition
Success
[38628] D/I2C: msgs[0] W, addr=0x52, len=2
[38632] D/I2C: send start condition
[38636] D/I2C: ACK
[38638] D/I2C: ACK
[38640] D/I2C: ACK
[38642] D/I2C: write 2 bytes
[38645] D/I2C: send stop condition
Success
[38650] D/I2C: msgs[0] W, addr=0x52, len=2
[38654] D/I2C: send start condition
[38658] D/I2C: ACK
[38660] D/I2C: ACK
[38662] D/I2C: ACK
[38664] D/I2C: write 2 bytes
[38667] D/I2C: send stop condition
Success
[38671] D/I2C: msgs[0] W, addr=0x52, len=2
[38676] D/I2C: send start condition
[38679] D/I2C: ACK
[38682] D/I2C: ACK
[38684] D/I2C: ACK
[38686] D/I2C: write 2 bytes
[38689] D/I2C: send stop condition
Success
[38693] D/I2C: msgs[0] W, addr=0x52, len=2
[38697] D/I2C: send start condition
[38701] D/I2C: ACK
[38703] D/I2C: ACK
[38705] D/I2C: ACK
[38708] D/I2C: write 2 bytes
[38710] D/I2C: send stop condition
Success
[38715] D/I2C: msgs[0] W, addr=0x52, len=1
[38719] D/I2C: msgs[1] R, addr=0x52, len=2
[38724] D/I2C: send start condition
[38727] D/I2C: ACK
[38729] D/I2C: ACK
[38731] D/I2C: write 1 byte
[38734] D/I2C: ACK
[38737] D/I2C: recieve bytes: 0x40, ACK
[38741] D/I2C: recieve bytes: 0xff, NACK
[38745] D/I2C: read 2 bytes
[38748] D/I2C: send stop condition
Success
data 0x03 :40 ff
[38754] D/I2C: msgs[0] W, addr=0x52, len=1
[38758] D/I2C: msgs[1] R, addr=0x52, len=2
[38763] D/I2C: send start condition
[38766] D/I2C: ACK
[38768] D/I2C: ACK
[38770] D/I2C: write 1 byte
[38773] D/I2C: ACK
[38776] D/I2C: recieve bytes: 0x80, ACK
[38780] D/I2C: recieve bytes: 0xff, NACK
[38784] D/I2C: read 2 bytes
[38787] D/I2C: send stop condition
Success
data 0x01 :80 ff
[38793] D/I2C: msgs[0] W, addr=0x52, len=1
[38797] D/I2C: msgs[1] R, addr=0x52, len=2
[38801] D/I2C: send start condition
[38805] D/I2C: ACK
[38807] D/I2C: ACK
[38809] D/I2C: write 1 byte
[38812] D/I2C: ACK
[38814] D/I2C: recieve bytes: 0x80, ACK
[38819] D/I2C: recieve bytes: 0xff, NACK
[38823] D/I2C: read 2 bytes
[38826] D/I2C: send stop condition
Success
data 0x00 :80 ff
[38832] D/I2C: msgs[0] W, addr=0x52, len=1
[38836] D/I2C: msgs[1] R, addr=0x52, len=2
[38840] D/I2C: send start condition
[38844] D/I2C: ACK
[38846] D/I2C: ACK
[38848] D/I2C: write 1 byte
[38851] D/I2C: ACK
[38853] D/I2C: recieve bytes: 0x40, ACK
[38858] D/I2C: recieve bytes: 0xff, NACK
[38862] D/I2C: read 2 bytes
[38865] D/I2C: send stop condition
Success
data 0x1b :40 ff
[38871] D/I2C: msgs[0] W, addr=0x52, len=1
[38875] D/I2C: msgs[1] R, addr=0x52, len=2
[38879] D/I2C: send start condition
[38883] D/I2C: ACK
[38885] D/I2C: ACK
[38887] D/I2C: write 1 byte
[38890] D/I2C: ACK
[38892] D/I2C: recieve bytes: 0x3f, ACK
[38897] D/I2C: recieve bytes: 0xff, NACK
[38901] D/I2C: read 2 bytes
[38904] D/I2C: send stop condition
Success
data 0x11 :3f ff
[38910] D/I2C: msgs[0] W, addr=0x52, len=1
[38914] D/I2C: msgs[1] R, addr=0x52, len=2
[38918] D/I2C: send start condition
[38922] D/I2C: ACK
[38924] D/I2C: ACK
[38926] D/I2C: write 1 byte
[38929] D/I2C: ACK
[38931] D/I2C: recieve bytes: 0xff, ACK
[38935] D/I2C: recieve bytes
  • 1
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值