mikeferguson / stm32

stuff/garbage for the STM32

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IMU values are occasionally corrupted

mikeferguson opened this issue · comments

Moved from mikeferguson/robomagellan#2:

It appears the high byte is updated, then table is read out, then low byte is updated. Need to prevent this. This is particularly bad when crossing 0 as the high byte changes from 00 -> ff and vice versa

Example sequence as seen on computer side:

-26, 249, 29

Actual sequence that should be seen:

-26, -7, 29

Plot:

screenshot from 2014-02-25 00 15 47

It appears this is not my complete lack of mutexing (nothing that touches IMU data is outside of the main while() loop), but rather a mis-configuration of the IMU. Should be fixed by 5a6afb9