Josh Leverette's blog

Josh Leverette's picture

Learning to communicate with LSM9DS0

Yesterday and today, I spent several hours poring over the LSM9DS0 datasheet, and I've been taking notes with pen and paper on how to configure and communicate with the module. I plan to start working on the code for the driver tomorrow, but preplanning any development is a valuable part of the actual development. The LSM9DS0 is a complex peripheral in some ways, though I guess that is unsurprising considering it is arguably one of the leading-edge 9-axis solutions on the market.

Communication can happen primarily in the form of I2C or SPI, with the LSM9DS0 having several interrupt wires that can be configured to generate interrupts for the MCU to hear. The messages that need to be sent all revolve around addresses and values, from what I can see, much like reading and writing to external memory. Each address represents a register on the LSM9DS0, and "all" you have to do is put the right values into the right registers, then wait for a time and read values out of different registers. The documentation doesn't make it very clear which registers you need to write to and in what order to start getting data out of the system, but I think I have it mostly figured out. At this point, it is definitely time to start doing and stop planning, since I can't know where to go next until I collect some real world data.

Josh Leverette's picture

First day of coding

Today is the official start of coding for GSoC 2015! I'm planning to begin coding momentarily. Unfortunately, life has been so busy for the past few weeks that I was unable to set aside time to write the 9-axis IMU driver for my STM32 Nucleo. My first order of business will be to start writing the 9-axis driver.

All of my code is going to be MIT licensed until otherwise directed. I have just now opened a new repository for the driver code. I also plan to commit some basic documentation to that repository, once I have made more progress.

My goal for today is to familiarize myself with the command structure for communicating with the LSM9DS0 and begin writing the driver.

EDIT: I had previously submitted a blog post discussing the LSM9DS0 and how I had verified everything was working with an Arduino and how I was planning to begin writing the driver for the Nucleo board. Apparently I only hit "Preview" and didn't hit "Save." I will have to be more careful about that in the future.

Syndicate content