Skip to content

This repository is made up of different branches that reflect the use of different peripherals on a STM32L476RG microcontroller

Notifications You must be signed in to change notification settings

vanDeventer/as2

 
 

Repository files navigation

IMU over SPI

Here, we make use of the Sparkfun 9DOF IMU over SPI. It is an ICM-20948 sensor chip, which is low power and measures acceleration, rotation rates (gyro), magnetometer [all in 3 dimensions] as well as temperature. It is quite an advanced little chip.

On power up, its sensors are off and need to be turned on. (See datasheet, which is in Canvas) But before that we ask the chip's identity (which is stored it its register 00) and the answer is 0xEA. If something is wrong, e.g., the wiring or the baud rate, the code is locked in the loop making this request. Do note that the Chip Select line is on PB6.

The code is also setup to use the STM32CubeMonitor to plot in realtime the X acceleration signal versus time (probeX). Look at the Signals directory to see setup screenshots of the chip and the CubeMonitor.

The SPI setup is as SPI setup The chip select setup is chipSelect The ProbeX in CubeMonitor looks like ProbeX The list of variables is found in elf where you can find ProbeX variables

About

This repository is made up of different branches that reflect the use of different peripherals on a STM32L476RG microcontroller

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages