2019-10-01 01:21 PM
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.
2019-10-07 09:00 AM
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!
2019-10-07 09:01 AM
PS: INT1 and INT2 pins are floating.
2019-10-07 10:37 AM
The CS pin is connected to the ground. Is this an issue? My uC needs to control the CS pin to establish the communication?
2019-10-08 01:32 AM
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
2019-10-08 03:16 AM
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.