ADIS16448 giving "Invalid CRC" after updating the roborio


Our team is using the Analog devices gyro ADIS16448. We have updated to the new image and are able to get readings from the gyro. However it is constantly giving an “Invalid CRC” in the console.

We are using Java and have imported the vendor libraries into VS Code.


Invalid CRC means that after sending the data over, the RIO suspects (based off the CRC) that the data is corrupted - a bit got flipped, the message got cut off, etc.

I would make sure your gyro is using the CRC (it’s a configurable option) and that your connections are solid.


Are you getting any good data points out of the part? Or do all readings give you a bad crc error?


What roborio image are you using? Apparently anything before v13 this year had a problem interfacing with the Analog Devices IMUs. TeamUpdate04.pdf (103.3 KB)


How often are you reading an invalid CRC? Once every few (10ish) seconds is reasonable during normal operation.


@mrada6 Any update on this? If you have any additional questions, feel free to send me a PM or reply here.


We believe the IMU may have been damaged during the off season we have ordered a new one and will be testing it out when it comes in.


Sounds good. If you continue to have issues, feel free to send me a PM.


I have the same issue. I recently got my ADIS 16448 gyro, and I struggle to get consistent output. The “Invalid CRC” error runs continuously once I upload the code. Here is the code I am running:

package frc.robot;

import edu.wpi.first.wpilibj.Joystick;

import edu.wpi.first.wpilibj.TimedRobot;

import edu.wpi.first.wpilibj.Timer;

import edu.wpi.first.wpilibj.VictorSP;


import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;

import com.analog.adis16448.frc.ADIS16448_IMU;

public class Robot extends TimedRobot {
public static final ADIS16448_IMU imu = new ADIS16448_IMU();

double GyroAngle;
double GyroCoefficient = 1.0; 
int DesiredAngle;
String DesiredDirection;

private static final String RightBox  = "Right Box";
private static final String LeftBox = "Left Box";
private static final String TurnLeft = "Turn Left";

private SendableChooser<String> m_chooser = new SendableChooser<>();
private String m_autoSelected;

int i = 1;

//Joystick leftStick = new Joystick(0);
//Joystick rightStick = new Joystick(1);
Joystick arcadeStick = new Joystick(2);

VictorSP leftVictor = new VictorSP(0);
VictorSP rightVictor = new VictorSP(1);

DifferentialDrive apolloDrive = new DifferentialDrive(leftVictor, rightVictor);

      public void Turn(String Direction, int Angle) {

  GyroAngle = Math.abs(GyroCoefficient * imu.getAngleX());

  DesiredDirection = Direction;
  DesiredAngle = Angle;

  while( GyroAngle >= DesiredAngle) {

  if (DesiredDirection == "left") {
    apolloDrive.arcadeDrive(0, .5);
    SmartDashboard.putNumber("Gyro Angle Degrees", GyroAngle);
  else if(DesiredDirection == "right") {
  apolloDrive.arcadeDrive(0, -.5);
  SmartDashboard.putNumber("Gyro Angle Degrees", GyroAngle);
  SmartDashboard.putNumber("Gyro Angle Degrees", GyroAngle);
 apolloDrive.arcadeDrive(0, 0); 
public void robotPeriodic() {
   apolloDrive.tankDrive(arcadeStick.getY() * .6, arcadeStick.getRawAxis(3) * .6);
SmartDashboard.putNumber("Gyro-Z",  Math.abs(imu.getAngleZ()));
SmartDashboard.putNumber("Accel-Z", imu.getAccelZ());

public void autonomousPeriodic() {

switch (m_autoSelected) {
  case LeftBox:
    for(i=1; i<=4; i++) {
      apolloDrive.arcadeDrive(.5, 0);
      Turn("left", 90);
  case RightBox:
    for(i=1; i<=4; i++) {
      apolloDrive.arcadeDrive(.5, 0);
      Turn("right", 90);
  case TurnLeft:
   Turn("left", 90);


Any help is much appreciated!! Thank you!


In addition to having this issue, I’ve noticed that this ADIS16448_IMU class is using an oddly high amount of CPU usage. When the line calling the constructor for the IMU was commented out, the CPU was at 35% versus the 90% it was at with that line of code.


I had the same issue. I fixed it by including


in robot.init


Did this fix both the CRC invalid issue and CPU usage?


This fixed the CRC issue. I’m not sure about the CPU usage, I haven’t checked that


Hi everyone,

We finally pushed a fix for Java users to maven and GitHub today. It looks like I forgot to change an IMU setting back to default after developing this year’s driver, causing the RoboRIO to have issues keeping up with the data rates. Next time you build code, be sure to connect to the internet to have VS Code pull from our repository if you used the online install method, otherwise be sure to pull the latest release from the GitHub repository. We’re still looking into reducing CPU usage to match C++ performance, but this fix should at least guarantee valid data.

Sorry for the issues!


Do you know if this would affect python users? I’ve been seeing some crc errors reported. We are using a navx via the SPI (MXP?) interface.


If you’re having issues using the navX you’d probably get better answers creating a new thread since this thread is about the ADIS16448 imu


Any updates on getting CPU Usage down in java? I have the most up to date driver installed, but the CPU usage is still high.

CPU without IMU initialization:

CPU with IMU initialization:

Here is the code that is instantiating and initializing the IMU:


import com.analog.adis16448.frc.ADIS16448_IMU;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

public class IMU {

    ADIS16448_IMU imu;

    public IMU (){
        imu = new ADIS16448_IMU();



Hi Avery, we’ve been trying to get CPU usage down as much as possible, but it looks like most of the inefficiency comes from how the JNI bindings handle the data acquisition and processing. We’ve tried stripping down as much of the driver as possible, with negligible improvements. I’m working with WPI to address this, but I don’t think there will be a fix this season. @Peter_Johnson might know more about what’s going on under the hood.