AnsweredAssumed Answered

ADXL345 in SPI getting wrong device ID and wrong output, working fine with I2C

Question asked by gandhi on Oct 28, 2015
Latest reply on Jan 6, 2016 by NevadaMark

Hi everyone,

For my thesis project I'm using ADXL345 with nucleo-L053R8 board. Initially i connected in I2C and it is working fine. Later on i needed high datarates and switched to SPI. Unfortunately the device is not working. I'm getting wrong device ID as 0x00 and readings are all zeros.

my connections:

SDI = MOSI

SDO = MISO

SCL = SCK

CS = CS

VS = 3V

Many people used the same libraries what i use but my device is not working.

It is the same device and  working fine when i connect in I2C.

 

I measure the voltages at all pins : all are 3V only but i find no voltage at MISO and MOSI.

Should i use any level shifter?

Looking for some support. Thank you in advance.

Outcomes