using multiple SPI slaves sensors

Hi all, 

I am working on interfacing 2 SPI sensors ADXL362 and ADXL372 for learning purposes. Following is the overlay created for the same.

&spi1 {
	compatible = "nordic,nrf-spim";
	label = "SPI_1";
	status = "okay";
	sck-pin = <41>;
	mosi-pin = <40>;
	miso-pin = <4>;
	
	cs-gpios = 	< &gpio0  26 GPIO_ACTIVE_LOW>,
				< &gpio0  27 GPIO_ACTIVE_LOW>;
				
	adxl362@0 {
		compatible = "adi,adxl362";
		label = "ADXL362";
		spi-max-frequency = <1000000>;
		reg = <0>;
		int1-gpios = <&gpio0 9 0>;
	};

	adxl372@1 {
		compatible = "adi,adxl372";
		label = "ADXL372";
		spi-max-frequency = <1000000>;
		reg = <1>;
		int1-gpios = <&gpio0 6 0>;
	};
};

 

refering this https://devzone.nordicsemi.com/f/nordic-q-a/69098/nrf9160-spi-and-spi_cs_control?pifragment-684=2

if anyone has multiple device examples or samples will be helpful. 

Parents Reply Children
Related