2015-03-05 09:58 AM
we are using the LSM303DTR. 4 wire spi.
we initialize CONFIG 1,CONFIG5 and CONFIG 7 only....assuming defaults on all others. on power up, we get the pitch and roll always returning 0x8008 (our gui displays this as -35.244ish deg for pitch and roll). This happens ''sometimes''... Other times, the device appears to operate normally..... I checked the amount of time before we actually write to the device on power up.. it appears the 3.3V is stable by the time we hit the SPI buss (~210mS)... We cant figure this out...... any clues suggestions??? when this happens we can still get the WHO_AM_I correctly... and reading back the config registers...they appear to be what we set them at.... This is killing us right now. any ST mems guru's out there with suggestions?.... jyoung AT lauferwind DOT com. #mems-ecompass-lsm3032015-03-24 04:21 AM
Hello John, I'm Maurizio.
I'm started to use LMS303D and see the same problem.In my investigation I belive the problem is due to wrong boot memory value load into reserved register:This is the startup value contenent into reserved register when the startup go well and Acc and Mag is working (data available):hex format[Register] = valueLSM303D [0xe]=0x51 reservedLSM303D [0xf]=0x49 WHO_I_AMLSM303D [0x10]=0x18 reservedLSM303D [0x11]=0x20 reservedHo to check it: simple make at startup of power supply the simple code:ReadyAllSensor = 0x05;while(ReadyAllSensor != 0x40){ LSM303D_ReadReg(ACC_I2C_ADDRESS, ReadyAllSensor,&LSM303D_response); printf(''LSM303D [0x%x]=0x%x \n\r'', ReadyAllSensor, LSM303D_response); ReadyAllSensor++;}I don't know the reason of that but I confimr what you have seen.If I leave Off the board for long time (hours or tens of minute) the LMS3030D start well, otherwhise when I reset or power off->on quickly the LSM303D do not works.These are some wrong value read from reserved register when startup BOOT failure and LSM303D do not works.LSM303D [0xe]=0x58LSM303D [0xf]=0x49LSM303D [0x10]=0x51LSM303D [0x11]=0x0I can't try to write reserved register to avoid to damage the few chip that I have as spare part. If some ST FAE will support us it will be a good for ST MEMs selection...