This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

adxl362 sample not compiling

Hi,

I am attempting to get the adxl362 sample working with the nrf9160 dk board. I am using the nordic SDK v1.2.0. I cannot get it to compile, compiling the code below fails with the error:

"DT_INST_0_ADI_ADXL362_LABEL undeclared".

I even tried downloading a fresh SDK install using the new toolchain manager. I have followed other adxl362 tickets on the forum without any success....the closest solution involved updating to the latest release which I have done.

Any help will be appreciated! 

Thanks in advance.

struct device *dev = device_get_binding(DT_INST_0_ADI_ADXL362_LABEL);
if (dev == NULL) {
printf("Device get binding device\n");
return;
}

overlay file:

&spi3 {
status = "ok";
sck-pin = <10>;
mosi-pin = <11>;
miso-pin = <12>;
ss-pin = <13>;
spi-max-frequency = <4000000>;

adxl362@0 {
compatible = "adi,adxl362";
label = "ADXL362";
spi-max-frequency = <4000000>;
reg = <0>;
int1-gpios = <&gpio0 9 0>;
};

config:

CONFIG_SENSOR=y
CONFIG_ADXL362=y
CONFIG_ADXL362_TRIGGER_GLOBAL_THREAD=y
CONFIG_ADXL362_INTERRUPT_MODE=1
CONFIG_ADXL362_ABS_REF_MODE=1

# SPI
CONFIG_SPI=y
CONFIG_SPI_3_NRF_SPIM=y
CONFIG_SPI_3=y 
CONFIG_SPI_NRFX=y

Related