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

Transferring BMI160 sample example to nRF9160 samples

I am working on transferring BMI160 sample given in zephyr samples (\ncs\zephyr\samples\sensor\bmi160) to nrf sample (\ncs\nrf\samples\nrf9160\bmi160).

Below is the changed bits:

nrf9160_pca10090ns.overlay file

&spi3 {
        status = "ok";
	ss-pin = <10>;
        sck-pin = <11>;
        mosi-pin = <12>;
        miso-pin = <13>;
        spi-max-frequency = <8000000>;
		
	bmi160@0 {
		compatible = "bosch,bmi160";
		reg = <0>;
		spi-max-frequency = <8000000>;
		label = "BMI160";
	};
};

prj.conf file

#Board Specific
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
#CONFIG_SERIAL=y
#CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_NEWLIB_LIBC=y
#CONFIG_PRINTK=y


#Init Sensor and Peripheral
#CONFIG_STDOUT_CONSOLE=y
#CONFIG_SPI=y
CONFIG_SENSOR=y
CONFIG_GPIO=y
#CONFIG_GPIO_NRFX=y
CONFIG_BMI160=y
CONFIG_BMI160_TRIGGER_OWN_THREAD=y
CONFIG_BMI160_TRIGGER=y


#Debug Specific
CONFIG_DEBUG=y
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_LOG_MAX_LEVEL=3
#CONFIG_LOG_BACKEND_UART=y


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

Main.c and CMake file are the same as provided in the sample and I get following error related to GPIO controller.

What could be the reason? Is it asking for an actual port and pin numbers? Thanks for your support.

Parents Reply Children
No Data
Related