Hi,
I have written a short driver for the ADXL362 accelerometer, which I'm attaching here, and I've connected breakout board of the accelerometer from Sparkfun to the nRF51 DK as specified in the picture from the datasheet. I also connected the accelerometer's GND and V+ to the DK's GND and VDD respectively.
In my application, I'm using the driver to read a register in the accelerometer (DEVID_AD in address 0x00) that I understand should always come back with the constant value of 0xAD. However, when debugging the application in Eclipse, the receive buffer is always 0x00.
I'm setting the SPI driver to use mode 0 since the accelerometer's datasheet says it is CPOL = CPHA = 0.
Could any body point out anything I might be doing wrong? The datasheet also says that the accelerometer powers up in standby mode but I figure that SPI comms should always be on.
Thanks in advance