cancel
Showing results for 
Search instead for 
Did you mean: 

How to communicate with LIS2DE12 (SPI)

luiscarmignotto
Associate II

Hi! I am trying to establish a SPI comm with an LIS2DE12 accelerometer. First, I would like to say that I have checked phase, polarity, msbFirst and CS. I am using an EM9304 as the master of the communication, and the spi clock frequency is aproppriated.

Writing or reading from the sensor, makes it sends an weird symmetrical waveform in to MISO pin.

(This waveform is equal to the LIS2DE12 ID (0X33 = 00110011))

I had tried many different registers (writing and reading) and the sensor only send this signal.

PS: Both images corresponds to clock and MISO. The MOSI signals was checked too and it is sending the correct bytes to the sensor.

0690X000009jv1vQAA.png0690X000009jv1qQAA.png

14 REPLIES 14
luiscarmignotto
Associate II

Hi, Eleon! The second 16 clock pulses are an attempt to read the same register that I tried to write data in the first 16 clock pulses. The VDD of the LIS2DE12 is tied to VDDIO. Here is the schematic for more details. Thanks!0690X000009k8EnQAI.png

luiscarmignotto
Associate II

PS: INT1 and INT2 pins are floating.

luiscarmignotto
Associate II

The CS pin is connected to the ground. Is this an issue? My uC needs to control the CS pin to establish the communication?

Thanks @luiscarmignotto​  for the sharing of the schematic. Yes, you need to be able to drive the CS, e.g. connecting it to the uC, because the SPI communication​ starts at the CS transition from Vdd(VddIO) to GND. Regards

The CS signal is usually low-active, i.e. connecting it to the ground means permanently enabling the device.

You would need to check with the datasheet if CS transitions play a dynamic role in communication seqences.