完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我有一个LSM9DS0,我正在尝试运行。我的I2C工作正常,因为我可以读取两个WHO_AM_I寄存器的正确值。我还可以读回一个控制寄存器,读取的数据与写入的内容相匹配。陀螺仪读数不稳定,看起来不正确。我在fifo旁路模式下运行。我通过控制寄存器禁用了两个轴,这些轴继续更新和移动。我认为禁用轴不会有任何更新。我正在使用0x80的函数寄存器进行多字节读取,我相信I2C正在工作。禁用轴是否应该在我身上移动?是否有任何可能导致此类行为的配置项?
谢谢, 约翰 #I2C-lsm9ds0 以上来自于谷歌翻译 以下为原文 I have a LSM9DS0 that I am trying to get operational. My I2C is working since I can read the correct values for both WHO_AM_I registers. I can also read back a control register and the data read matches what was written. The Gyro readings are not stable and don't look correct. I am operating in fifo bypass mode. I've disabled two of the axes via the control register and those axes continue to update and move around. I would think that there would not be any updates to a disabled axis. I am oring the function register with a 0x80 for a multibyte read and I believe that the I2C is working. Should the disable axes be moving on me? Are there any configuration items that can cause this kind of behavior? Thanks, John #i2c-lsm9ds0 |
|
相关推荐
2个回答
|
|
我有类似的问题。陀螺仪具有恒定的值。所有3个轴都打开但它们保持不变。甚至连加速输出都会发生这种情况。通常打开/关闭设备会解决它。我不知道如何解决它。我希望ST的某些人可以提供帮助。
以上来自于谷歌翻译 以下为原文 I've got a similar problem. The gyro has just constant values. All 3 axes are on but they stay constant. That even happens from time to time with the acceleration output. Usually switching the device on/off resolves it. I've got no idea how to resolve it. I was hoping somebody from ST could help. |
|
|
|
这实际上是从这个github代码逐字逐句(
)并且应该工作(我尝试了很多不同的配置)。我实际上不需要中断,但另一方面它们也不会对测试造成伤害。 // GYRO gyro_txrx(GYROTYPE,LSM9DS0_REGISTER_CTRL_REG1_G,0x0f); gyro_txrx(GYROTYPE,LSM9DS0_REGISTER_CTRL_REG2_G,0x30); gyro_txrx(GYROTYPE,LSM9DS0_REGISTER_CTRL_REG3_G,0x88); gyro_txrx(GYROTYPE,LSM9DS0_REGISTER_CTRL_REG4_G,0x00); gyro_txrx(GYROTYPE,LSM9DS0_REGISTER_CTRL_REG5_G,0x10); 以下是格式的一些示例数据: -1,时间戳,AX,AY,AZ,GX,GY,GZ,MX,MY,MZ ,,,, 陀螺仪数据是恒定的: -1,4484,32834,32615,34048,28004,27718,32769,33482,31668,37950,c0,8875913,8248723 -1,4485,32838,32605,34042,28004,27718,32769,33482,31668,37950,c0,8875712,8277381 -1,4486,32850,32589,34042,28004,27718,32769,33482,31668,37950,c0,8875863,8255033 -1,4487,32850,32608,34049,28004,27718,32769,33536,31661,37900,c0,8875814,8262740 -1,4488,32834,32596,34056,28004,27718,32769,33536,31661,37900,c0,8875751,8272598 -1,4489,32842,32608,34043,28004,27718,32769,33536,31661,37900,c0,8875976,8248838 -1,4490,32826,32613,34050,28004,27718,32769,33536,31661,37900,c0,8875701,8277438 -1,4491,32832,32596,34037,28004,27718,32769,33536,31661,37900,c0,8875850,8254841 -1,4492,32831,32600,34039,28004,27718,32769,33536,31661,37900,c0,8875886,8263068 -1,4493,32831,32611,34046,28004,27718,32769,33536,31661,37900,c0,8875797,8272356 以上来自于谷歌翻译 以下为原文 This is actually take verbatim from this github code ( ) and should work (I've tried many different configs). I actually don't need the interrupts but on the other hand they won't harm either for testing. // GYRO gyro_txrx(GYROTYPE, LSM9DS0_REGISTER_CTRL_REG1_G, 0x0f); gyro_txrx(GYROTYPE, LSM9DS0_REGISTER_CTRL_REG2_G, 0x30); gyro_txrx(GYROTYPE, LSM9DS0_REGISTER_CTRL_REG3_G, 0x88); gyro_txrx(GYROTYPE, LSM9DS0_REGISTER_CTRL_REG4_G, 0x00); gyro_txrx(GYROTYPE, LSM9DS0_REGISTER_CTRL_REG5_G, 0x10); here is some sample data in the format: -1,timestamp,ax,ay,az,gx,gy,gz,mx,my,mz,,,, the gyro data is constant: -1,4484,32834,32615,34048,28004,27718,32769,33482,31668,37950,c0,8875913,8248723 -1,4485,32838,32605,34042,28004,27718,32769,33482,31668,37950,c0,8875712,8277381 -1,4486,32850,32589,34042,28004,27718,32769,33482,31668,37950,c0,8875863,8255033 -1,4487,32850,32608,34049,28004,27718,32769,33536,31661,37900,c0,8875814,8262740 -1,4488,32834,32596,34056,28004,27718,32769,33536,31661,37900,c0,8875751,8272598 -1,4489,32842,32608,34043,28004,27718,32769,33536,31661,37900,c0,8875976,8248838 -1,4490,32826,32613,34050,28004,27718,32769,33536,31661,37900,c0,8875701,8277438 -1,4491,32832,32596,34037,28004,27718,32769,33536,31661,37900,c0,8875850,8254841 -1,4492,32831,32600,34039,28004,27718,32769,33536,31661,37900,c0,8875886,8263068 -1,4493,32831,32611,34046,28004,27718,32769,33536,31661,37900,c0,8875797,8272356 |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2711 浏览 1 评论
3235 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1806 浏览 1 评论
3643 浏览 6 评论
6030 浏览 21 评论
1332浏览 4评论
206浏览 3评论
194浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
348浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
439浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-18 09:46 , Processed in 1.032633 second(s), Total 51, Slave 44 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号