完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,大家好,
我在FIFO连续模式下使用L6MSDL芯片作为我的应用程序(连接到STM32L4),我在理解我们可以在FIFO_STATUS3寄存器中读取的FIFO模式时遇到了一些麻烦。 我通过以下方式配置了LSM6DSL: - 加速度计ODR =陀螺仪ODR = FIFO ODR = 413 Hz - 没有抽奖 - 只有加速度计和陀螺仪数据集存储在fifo中 - 启用BDU块更新 - FIFO处于连续模式 我定期读取存储在FIFO中的内容。要知道存储了多少数据,我会读取FIFO_STATUS1和FIFO_STATUS2寄存器。我确保每次读取多个6个数据集(3个陀螺仪数据和3个加速度计数据) 我阅读得足够快,所以在fifo中没有数据被覆盖。我通过检查超限状态来验证。 我的问题是我从FIFO_STATUS3读取的模式并不总是等于0,即使我每次读取6个数据集的多个。 这导致我的数据集未正确对齐(X_GYROSCOPE,Y_GYROSCOPE,Z_GYROSCOPE,X_ACCELEROMETER,Y_ACCELEROMETER,Z_ACCELEROMETER)。 如果模式值不同于0,我尝试读取FIFO_STATUS3并重置FIFO,但我的数据有时未正确对齐。 在我的案例中,有什么理由改变模式吗? 有没有办法确保数据在从fifo读取之前始终正确对齐? 我希望我的信息很清楚。 谢谢。 以上来自于谷歌翻译 以下为原文 Hi Everyone, I am Using the L6MSDL chip for my application (connected to a STM32L4) in FIFO Continuous Mode and I am having some troubles understanding the FIFO pattern that we can read in FIFO_STATUS3 register. I configured the LSM6DSL The following way : - Accelerometer ODR = Gyroscope ODR = FIFO ODR = 413 Hz - No decimation - Only accelerometer and gyroscope data sets are stored in fifo - BDU Block Update is enabled - FIFO Is in continuous mode I read periodically what is stored in FIFO. To know how much data is stored, I read the FIFO_STATUS1 and FIFO_STATUS2 registers. I make sure to read a multiple of 6 data sets each time (3 gyroscope data and 3 accelerometer data) I read fast enough so no data is overwritten in fifo. I verify that by checking the overrun status. My problem is that the pattern that I read from FIFO_STATUS3 is not always equal to 0, even though I read a multiple of 6 data sets each time. This result in my data sets not being aligned correctly as it should be(X_GYROSCOPE, Y_GYROSCOPE, Z_GYROSCOPE, X_ACCELEROMETER, Y_ACCELEROMETER, Z_ACCELEROMETER). I tried reading the FIFO_STATUS3 and resetting the FIFO if the pattern value is different then 0, but my data are sometimes not aligned correctly. Is there any reason why the pattern changes in my case? Is there any way to ensure that data are always correctly aligned before reading from fifo? I hope my message is clear. Thank you. |
|
相关推荐
4个回答
|
|
请参阅应用笔记AN5040中的8.2.3章节。
我建议您设置FIFO阈值,并仅在达到阈值时读取数据。 我认为当您定期读取FIFO时传感器同时写入FIFO时可能会出现问题。 以上来自于谷歌翻译 以下为原文 Please check chapter 8.2.3 in application note AN5040. I would recommend you to set a FIFO threshold and read the data only if the threshold in reached. I think there might be issue when you are reading the FIFO periodically a the sensor is writing to the FIFO at the same time. |
|
|
|
你好Miroslav。
感谢您的回答。我可以试试。假期过后会这样做,然后再回复你。 但还有一个问题,如果问题来自于在添加某些数据时读取FIFO,那么这个阈值是否足够? 我的意思是我还应该进入旁路模式并在读取时停止当前的采集吗?我想避免进入旁路模式。 谢谢你的帮助 ! 儒勒 以上来自于谷歌翻译 以下为原文 Hello Miroslav. Thanks for your answer. I can try that. Will do that after the holidays and come back to you. But one more question, if the issue would come from reading the FIFO when some datas are added, will this threshold be enough? I mean shall I also enter bypass mode ans stop the current acquisition while reading? I would like to avoid entering bypass mode. Thanks for your help ! Jules |
|
|
|
|
|
|
|
你好,
谢谢你的回答。 我和Jules一起工作,我实现了你的建议 以前的答案。现在模式已修复,数据集始终正确 对齐。 但是我遇到了另一个问题。如果你有时间参加,我就创造了这个问题 看。 https://community.st.com/s/question/0D50X00009hmIZiSAM/lsm6dsl-fifo-data-set-corrupted 谢谢。 以上来自于谷歌翻译 以下为原文 Hello, Thank you for the answer. I work with Jules and i implemented what u suggested in the previous answer. The pattern is now fixed and data sets are always correctly aligned. However I encountered another problem. I created this question if u have the time to take a look. https://community.st.com/s/question/0D50X00009hmIZiSAM/lsm6dsl-fifo-data-set-corrupted Thank you. |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2730 浏览 1 评论
3239 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1808 浏览 1 评论
3647 浏览 6 评论
6035 浏览 21 评论
1337浏览 4评论
197浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
350浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
442浏览 2评论
STM32处理增量式编码器Z信号如何判断中断是正转的还是反向转的?
273浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 22:11 , Processed in 1.179645 second(s), Total 82, Slave 66 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号