drivers/lis3dh: fixed bug and simplified init()#6479
drivers/lis3dh: fixed bug and simplified init()#6479jnohlgard merged 1 commit intoRIOT-OS:masterfrom
Conversation
- changed to SPI_MODE_0 - made init() function use the params struct as parameter
|
@kYc0o: or could you give this a quick test run?! |
|
@haukepetersen Nice! Thanks for cleaning up the driver. I'll give it a spin right now. |
|
I agree that from the data sheet it looks like it should be using mode 3. In Contiki, the configuration we have is using mode 3 for the device. |
jnohlgard
left a comment
There was a problem hiding this comment.
The driver works for me, the SPI mode handling needs further investigation on Kinetis.
|
I will look at the SPI output on my logic analyzer later today, to make sure the kinetis is actually doing what it promises to do... |
|
@haukepetersen thanks! |
|
FYI: Jenkins fails because this PR is not rebased to current master, where the |
|
nvm, Jenkins is green now. Did not refresh the website .. |
|
@gebart would you mind to merge this PR? |
|
It seems fine. I would like to see the SPI mode fixed though, but that's likely a periph bug and should go in its own PR. |
|
There is a new release pending so at this point the backporting-needed label is only noise ;-) |
Now the driver is working fine here at my desk with the
mulleboard.One thing that I find a little confusing, though: The driver is running the SPI bus in
MODE_0(pol and pha set to0). From the datasheet, the device should run however inMODE_3(pol and pha set to1). But when I tell the driver to useMODE_3, I can't interact with the sensor anymore...@gebart: would you mind to have a quick look at this? Thx!