-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
driver/mpu9x50: make mpu9150 more generic #12103
Conversation
Thank you for your patch! Can you please squash the commits so there is only one commit that does all the renaming and one to add support for the new chip? And of course if there are independent fixes to the driver, they should also have their own commit as well. That should make this PR much easier to review. |
This PR is related to PR #9516. Please note the discussion there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JannesVolkens Are there real changes in driver implementation or just renamings?
When I was looking to the register maps of both sensors some time ago, I figured out the following:
- the
ACCEL_CONFIG
register is splitted into two registers (register 28 an 29). The additional registerACCEL_CONFIG2
only contains the settingsACCEL_FCHOICE_B
andA_DLPF_CFG
that seem to be new in MPU9250. - additional new configuration
FCHOICE_B
inGYRO_CONFIG
register 26 - in MPU9250, the FIFO mode can be configured by by an additional bit in register 26.
Did you check in detail that all the bits in new registers are not required to be handled?
I should be able to run some tests on it. According to the manufacturer there shouldn't be a difference in basic usage, only low power stuff.
|
It seems like there is a problem with the temperature readings. The formula is wrong for both devices I believe The mpu-9150 The mpu-9250 |
@MrKevinWeiss do you think we could get this in before the soft feature freeze? |
I think this should be ready soon. I only have one day in the office but I looked over the code and if the formula and everything is fix and working I would just like @leandrolanzieri or someone to quick test it to see proper temperature values. |
@PeterKietzmann My question #12103 (review) is still not answered. When PR #9516 was provided, I used the former MPU9150 driver to test it with a MPU9250. At that time, the driver was working without any changes. Therefore, I was asking @JannesVolkens whether the PR includes only renamings or whether there are real changes in the driver that would have to be checked. Furthermore, I wanted to know whether he checked the changes in the two registers I mentioned are not affected by the driver. |
I've had a look at the changed registers and these extra bits are additional features. If they are not used the driver for the MPU9150 also works for the MPU9250. |
So far things look pretty good. I will test after you rebase! |
cc0a343
to
e1b205f
Compare
e1b205f
to
742a23c
Compare
Rename all files Rename all variables, methods and methodcalls Rename all folders Add to the makefiles Add to doc
d414b9f
to
b276dd1
Compare
b276dd1
to
d0b5431
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a big improvement. I witnessed the test, ACK!
Murdock is not happy yet. |
df80c0a
to
20e6263
Compare
Change msbiot Makefile.dep back to mpu9150
20e6263
to
fdd3449
Compare
Contribution description
The driver for the MPU9150 motion sensor has been modified to work for the MPU9150 and MPU9250. The driver was tested using the CC2650-launchpad.
Testing procedure
The test under
tests/driver_mpu9x50
can be performed for both sensors. The following parameter must be set for the MPU9250 sensor:DRIVER=mpu9250
Issues/PRs references
None