SPI communication issue with Accelerometer ADXL345

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SPI communication issue with Accelerometer ADXL345

902 次查看
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 项奖励
回复
1 回复

882 次查看
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 项奖励
回复