accelerometer causing crio to stop

Hi there. I’m having a problem with an accelerometer. It seems to work for about a minute and then the crio seems to freeze. The numbers on the driver station stop moving and the joysticks no longer work. The crio seems to continue doing what ever it was doing last. On the net console, I do not see an exception. Could I be checking the values to quickly? My teliop loop has Wait(0.05);.

//Declarations
Gyro m_ShooterGyro;
ADXL345_SPI m_Acc;
//Init
Shooter::Shooter():
m_ShooterGyro(1)
,m_Acc(SensorBase::GetDefaultDigitalModule(), 4, 5, 6, 7, ADXL345_SPI::kRange_2G)
{
}

// usage code
// this is in teliop
ADXL345_SPI::AllAxes Axes2 = {0.0};
Axes2 = m_Shooter->m_Acc.GetAccelerations();
g_dsLCD->Printf(DriverStationLCD::kUser_Line4, 1, “XAxis: %f”, Axes2.XAxis);
g_dsLCD->Printf(DriverStationLCD::kUser_Line5, 1, “YAxis: %f”, Axes2.YAxis);
g_dsLCD->Printf(DriverStationLCD::kUser_Line6, 1, “ZAxis: %f”, Axes2.ZAxis);

I would recommend running the code using the Wind River debugger (as opposed to deploying the code). When it freezes, you can pause the code and see where it happens to be frozen – or if its an exception of some kind, then it will give you that message too.

So I was planning to use the old red board ADXL335 instead since I can’t get the ADXL345 to work. Would this be the Accelerometer class?

I figured out the freezing was due to a bad accelerometer. I’m using the accelerometer in I2c mode. The accelerometer always returns the number 21420040 for all axis. Anyone have a clue as to why?