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

Issue: ADXL362 code build failed on PCA10090

Hi,

I am trying to build ADXL362 with pca10090ns for nrf9160DK (PCA10090) (west build -b nrf9160_pca10090ns).
I have added the following configurations in prj.conf.  Though the build was failed.

# Sensors
CONFIG_SPI=y
CONFIG_SENSOR=y
CONFIG_ADXL362=y
CONFIG_ADXL362_TRIGGER_GLOBAL_THREAD=y
CONFIG_ADXL362_INTERRUPT_MODE=1
CONFIG_ADXL362_ABS_REF_MODE=1

But I can see that, similar ADXL362 configurations are available at "prj_nrf9160_pca20035ns.conf" and it was successfully building.  

I have tried with different versions. But getting following errors
SW: v1.1.0 and below

 error: 'DT_INST_0_ADI_ADXL362_BASE_ADDRESS' undeclared here (not in a function); did you mean 'DT_INST_0_ADI_ADXL362_BUS_NAME'?
  .spi_slave = DT_INST_0_ADI_ADXL362_BASE_ADDRESS,

 error: 'DT_INST_0_ADI_ADXL362_BUS_NAME' undeclared here (not in a function); did you mean 'DT_INST_0_ARM_ARMV8M_MPU_SIZE'?

Please let me know, how can i build ADXL362 code for nrf9160_pca10090ns

Parents
  • Hi!

    Can I see your overlay file? It should look something like this.

    &spi3 {
    	compatible = "nordic,nrf-spim";
    	status = "okay";
    	sck-pin = <3>;
    	mosi-pin = <4>;
    	miso-pin = <5>;
    	cs-gpios = <&gpio0 8 0>, <&gpio0 7 0>;
    
    	adxl362@0 {
    		compatible = "adi,adxl362";
    		label = "ADXL362";
    		spi-max-frequency = <8000000>;
    		reg = <0>;
    		int1-gpios = <&gpio0 9 0>;
    	};
    };

    I would also recommend taking a look at part 2 of the NCS tutorial. It describes how to do this in more detail. 

    Best regards,

    Heidi

Reply
  • Hi!

    Can I see your overlay file? It should look something like this.

    &spi3 {
    	compatible = "nordic,nrf-spim";
    	status = "okay";
    	sck-pin = <3>;
    	mosi-pin = <4>;
    	miso-pin = <5>;
    	cs-gpios = <&gpio0 8 0>, <&gpio0 7 0>;
    
    	adxl362@0 {
    		compatible = "adi,adxl362";
    		label = "ADXL362";
    		spi-max-frequency = <8000000>;
    		reg = <0>;
    		int1-gpios = <&gpio0 9 0>;
    	};
    };

    I would also recommend taking a look at part 2 of the NCS tutorial. It describes how to do this in more detail. 

    Best regards,

    Heidi

Children
Related