ADXL362 with nRF9160 DK not working

Hello Nordic Support,

I started with a sensor sample project for ADXL362 Three Axis Accelerometer (https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/sensor/adxl362) and connected to my nRF9160DK board. I used the same SPI lines that external memory is used on nRF9160DK board but a different Chip Select IO for the sensor. I am able to compile the code successfully but I am not able to bind the sensor. Can you please review and suggest what could be an issue?

Project:

adxl362.zip

Parents
  • I sort of found the problem. The looked in to the adxl362 drivers provided in ncs v1.7.0 zephyr drivers and as per the "adxl362_init()" if sensor do not respond to Part ID read command <0B><02> with <F2> then no further configuration is done on the sensor leaving sensor in standby mode. So further read of XYZ channels will not read any data. For some reason I am always getting <F0>  instead of <F2> for Part ID command. I dropped SPI clock rate top 1 MHZ and just in case signals has distortion at higher frequency. The sensor board is connected directly on the header of the nRF91DK board without any wires and signals are clean and square. But still Part ID read command is returning incorrect ID.

    I modified zephyr adxl362 driver (just for debugging) to by pass return on Part ID read error and let driver go ahead with sensor configuration. With that I am now able to read XYZ channels each time although channel data are noisy.

    One thing I am finding very odd and not able to remove is the clock delay between command byte and data read byte. Delay is about 16us at 1Mhz SPI clock and 27us at 4Mhz SPI clock. I am not sure if this is causing the incorrect Part ID read, but I would like to minimize it if possible. It looks like delay of SPI peripheral in nRF91 when it switch write to read mode. Any idea how to reduce this delay?

  • What device are you trying to interface? Are you sure this is the ADXL362?

Reply Children
No Data
Related