AnsweredAssumed Answered

ADXL362 communication problem

Question asked by collegeonthehill on Jul 10, 2018
Latest reply on Jul 11, 2018 by collegeonthehill
I’m trying to set up a driver so the TI Launchpad cc2640 can communicate with the ADXL362 accelerometer, but can’t get the SPI communication quite right. The correct data is going over MOSI but nothing is coming back over MISO. 
I've connected the ADXL sensor to an arduino and run sample code which shows the sensor works and has fine connections. Comparing the Oscilloscope readings from the Arduino to the Launchpad show a couple basic differences. The first difference is the Chip Select in the arduino goes low earlier than the launchpad and stays low for the length of the transfer (compared to going high between bytes). The second difference is for the arduino, MOSI is default high.

I suspect the issue is with Chip Select rather than MOSI, as MOSI still goes low in time for the first rising edge of the clock. For Chip Select, I also tried implementing a software CS, where a pin manually was set low before the transfer and then pulled back high but that didn't seem to fix anything. In addition I disconnected MISO from the launchpad and connected it straight to the scope so as to test for an error in the sensor being able to pull the launchpad PIN high/low but that seemed to have no effect.

 

Per the spec sheet  the Launchpad Clk is at 4MHz (same as Arduino) (not for the 2nd screengrab, but subsequent tests at 4MHz show the same) and CS is held high for more than 100ns before data transmission.
I’ve also setup the chip to be powered by an external source to check that.
Any thoughts are much appreciated,
D11 is CS, D8 is CLK, D10 is MOSI, D9 is MISO
Arduino Working - 
Launchpad not working -
Launchpad not working with SW CS - ##

Outcomes