完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,
我无法使用4线SPI与LSM6DS3通信。根据数据表,我已经验证了设备的信号是否正确。我命令0x8F执行WHO_AM_I命令,但我没有看到任何有关MISO的信息。我能想到的唯一问题是SCx和SDx引脚保持打开状态。我没有将它们绑在VCC或地面上。这可能是问题吗?由于包装,我不能在船上修改它。 以上来自于谷歌翻译 以下为原文 Hello Everyone, I am having trouble talking to the LSM6DS3 using 4 wire SPI. I have verified the signals to the device as being correct per the datasheet. I am commanding 0x8F to do a WHO_AM_I command but am not seeing anything coming back on MISO. The only problem I can think of is the SCx and SDx pin is left open. I did not tie them to VCC or ground. Could this be the problem? Due to the package, I can't modify it on board. |
|
相关推荐
3个回答
|
|
这些线路不应该是浮动的,但由于lsm是主机,因此可能在这些线路上有上拉电阻,也许你可以测量这些引脚上的电压。无论如何,我认为这不会影响你的阅读。也许仔细检查您的SPI配置,因此速度不应高于10MHz,8位数据大小。此外,如果您使用NSS引脚可能会切换到软件控制引脚。至少对我来说,NSS在切换到软件CS引脚后没有工作,它工作正常,我可以从LSM6读取数据
以上来自于谷歌翻译 以下为原文 Those lines shouldn't be floating for sure but since lsm is a master here it might have pull-ups on those lines maybe you can measure voltage on those pins. Anyway I don't think it would affect your readings. Maybe double check your SPI configuration so speed shouldnt be higher than 10MHz with 8bit Data size. Also if you are using NSS pin maybe switch to software controlled pin. Since at least for me NSS didn't work as it should after switching to software CS pin it worked and I can read the data from LSM6 |
|
|
|
我不知道你输错了这个值,但是对于LSM6DS3,WHO_AM_I命令是0x0F而不是0x8F。
以上来自于谷歌翻译 以下为原文 I don't know if you mistyped the value, but the WHO_AM_I Command is 0x0F and not 0x8F for LSM6DS3. |
|
|
|
默认情况下,大多数mems使用3线模式(详细不知道这个)。当NSS为低时,选择芯片。当NSS为高电平时,它使用I2C(因此,如果使用多个SPI从器件,请务必小心)。要激活4线模式,您可以(在3线模式下)在芯片内写入一个位以激活4线模式。然后阅读WHO_AM_I可能会有效......
希望这可以帮助。祝你好运! 以上来自于谷歌翻译 以下为原文 By default, most mems use 3 wire mode (don't know this one in details). When NSS is low, the chip is selected. When NSS is high, it uses I2C (so be careful if using multiple SPI slave devices). To activate the 4 wire mode, you may have (in 3 wire mode) to write a bit inside the chip to activate the 4 wire mode. Then reading the WHO_AM_I may work... Hope this helps. Good luck! |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
1392 浏览 1 评论
2058 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1507 浏览 1 评论
2803 浏览 6 评论
5186 浏览 21 评论
351浏览 4评论
486浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
276浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
552浏览 3评论
466浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-19 10:16 , Processed in 0.756681 second(s), Total 47, Slave 40 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号