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
  • Hello,

    I resolved the sensor binding error. The device binding method used in the ADXL362 zephyr sensor sample code is not supported for ncs 1.7.0.

    I modified overlay file as below:

    And the device binding method changed as below:

    With these changes, I am not getting binding error any more but sensor data read is not working. Looking at the SPI signal with a logic analyzer, the signals that master is outputting don't seem to be correct for sensor to respond.

    This is the SPI trace with nRF9160 DK connected to ADXL362. The SPI clock stops several times while reading data.

    This is the trace of the same sensor board connected to a arduino board:

    Any suggestions where I can look for potential problem?

  • Did you configure the board control to enable ext_mem_ctrl? 

Reply Children
  • I do not want to change board controller firmware at this point, else I dont know what else will break. I changed my pin assignments to other pins that are not shared with board controller. But I am seeing the same SPI protocol waveform. The clock always stops  for about 30us after sending first 2 bytes (command).

    The other differences I can see between nRF91 DK SPI and Arduino board SPI waveform are:

    1. The MOSI io default state is low for nRF91 DK vs high for Arduino board.

    2. When master clocks to read 8 bytes out, the MOSI io stays high entire time in nRF91 DK vs stay low during bytes read and toggle between data bytes for Arduino board.

    3. The clocks for 8 data bytes read is contiguous without any break between each bytes read for nRF91 DK vs 1us idle between bytes reads for Arduino board.

    It definitely looks like some kind of SPI configuration or SPI driver level issue. Need help urgently please.

Related