SPI communication issue with Accelerometer ADXL345

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI communication issue with Accelerometer ADXL345

861 Views
Abhinav1
Contributor I

We are trying to interface a controller mpc5748g as master to an accelerometer ADXL345. Through logic analyzer we are able to see that MISO line is responding with 0xE5 (Which is the id at 0x00 of the accelerometer) every time. when we are trying to write something to the registers, the MISO line is providing with 0xCA and after that every frames are 0x00 for the remaining write operations. Need support on this. 

0 Kudos
Reply
1 Reply

841 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

do you follow SPI protocol as stated in device DS? Per timing diagram it seems nothing is send back when writing to ADXL345. If there is data, should be ignored during writes to the ADXL345 as the DS states. Also after power you need to enter measurement mode to be able to read data from respective registers.
Try to follow some generic basic examples from the web.

BR, Petr

0 Kudos
Reply