Interfacing MPU9250 with BMD300.

I have designed a custom board and it has following components:
BMD300 (Module based on nRF52832 IC)
MPU9250
GPS (L80-R QUECTEL)
There are some other components as well but for now I just want to interface MPU9250 with BMD300. For that I am using the sample provided in the nRF Connect SDK (V 2.6.0) in VS Code. 
Pin Connection:
MPU9250       :   BMD300
SDA                :   9
SCL                :   8
Int                   :   22

I have pulled up the SDA and SCL lines with 4.7k resistors. AD0 pin of MPU9250 pulled down with 10k resistor so the address would be 0x68 according to the data sheet. 

Prj.conf:

CONFIG_I2C=y
CONFIG_SENSOR=y
CONFIG_MPU6050_TRIGGER_NONE=y
CONFIG_CBPRINTF_FP_SUPPORT=y

CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=y
CONFIG_NEWLIB_LIBC=y

CONFIG_LOG=y
CONFIG_RTT_CONSOLE=y

overlay file:
&i2c0 {
    mpu6050@68 {
        compatible = "invensense,mpu6050";
        reg = <0x68>;
        status = "okay";
        int-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
    };
};


Code builds without any errors. I am using J-Link (Segger) to program the BMD300. After uploading the code I get this:

Device mpu6050@68 is not ready
[00:00:00.500,152] <err> MPU6050: Failed to read chip ID.
*** Booting Zephyr OS build v3.5.99-ncs1 ***

BMD300 is getting the required power (3.2V) and so does the MPU9250. There are I2C header pins on my board so when I connect these pin with esp32. After uploading the code to the esp32 using Arduino IDE I am able to get the values.
  • Hi, 

    I will be looking into your case. Just a heads up, the MPU9250 is marked as EOL as not recommended for new designs. 

    Could you try adding the following Kconfig:

    CONFIG_MPU9250=y

    Also change your overlay to:

    compatible="invensense,mpu9250"

    Regards

    Runar

  • after changing compatibility I am getting this:

    Property "gyro-sr-div" is required
    Property "gyro-dlpf" is required
    Property "gyro-fs" is required
    Property "accel-fs" is required
    Property "accel-dlpf" is required
    Where can I find these properties or Where should I define these?

    CONFIG_MPU9250=y -> this giving me ( in build :n)
  • Hi

    You can view the required properties here. It should be defined in the overlay for the device  

    &i2c0 {
        mpu6050@68 {
            compatible = "invensense,mpu9250"; //updated due to copy past error
            reg = <0x68>;
            status = "okay";
            int-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
            	gyro-sr-div = <10>;
        	gyro-dlpf = <5>;  //input fitting value
        	gyro-fs = <250>; //input fitting value
        	accel-fs = <2>;  //input fitting value
        	accel-dlpf="5.05"; //input fitting value
        };
    };

    I would expect it to look something like this

    Regards

    Runar

  • E:/SmartShoeFirmware/mpu6050_2/src/main.c: In function 'main':
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util.h:94:55: error: size of unnamed array is negative
    94 | #define ZERO_OR_COMPILE_ERROR(cond) ((int) sizeof(char[1 - 2 * !(cond)]) - 1)
    | ^
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:72:26: note: in definition of macro '__DEBRACKET'
    72 | #define __DEBRACKET(...) __VA_ARGS__
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
    64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
    | ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
    59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_macro.h:180:9: note: in expansion of macro 'Z_COND_CODE_1'
    180 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
    | ^~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:284:9: note: in expansion of macro 'COND_CODE_1'
    284 | COND_CODE_1(DT_HAS_COMPAT_STATUS_OKAY(compat), \
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:286:22: note: in expansion of macro 'ZERO_OR_COMPILE_ERROR'
    286 | (ZERO_OR_COMPILE_ERROR(0)))
    | ^~~~~~~~~~~~~~~~~~~~~
    E:/SmartShoeFirmware/mpu6050_2/src/main.c:89:46: note: in expansion of macro 'DEVICE_DT_GET_ONE'
    89 | const struct device *const mpu6050 = DEVICE_DT_GET_ONE(invensense_mpu6050);
    | ^~~~~~~~~~~~~~~~~
    [6/63] Building C object zephyr/drivers/sensor/mpu9250/CMakeFiles/drivers__sensor__mpu9250.dir/mpu9250.c.obj
    FAILED: zephyr/drivers/sensor/mpu9250/CMakeFiles/drivers__sensor__mpu9250.dir/mpu9250.c.obj
    C:\ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF52832_XXAA -D_ANSI_SOURCE -D_FORTIFY_SOURCE=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR_SUPERVISOR__ -D__ZEPHYR__=1 -IC:/ncs/v2.6.0/zephyr/include -IE:/SmartShoeFirmware/mpu6050_2/build/zephyr/include/generated -IC:/ncs/v2.6.0/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/ncs/v2.6.0/zephyr/lib/libc/newlib/include -IC:/ncs/v2.6.0/zephyr/soc/common/nordic_nrf/. -IC:/ncs/v2.6.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.6.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.6.0/zephyr/modules/cmsis/. -IC:/ncs/v2.6.0/modules/hal/nordic/nrfx -IC:/ncs/v2.6.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.6.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.6.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.6.0/modules/debug/segger/SEGGER -IC:/ncs/v2.6.0/modules/debug/segger/Config -isystem C:/ncs/v2.6.0/zephyr/lib/libc/common/include -Wshadow -fno-strict-aliasing -Os -imacros E:/SmartShoeFirmware/mpu6050_2/build/zephyr/include/generated/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=E:/SmartShoeFirmware/mpu6050_2=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.6.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.6.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -MD -MT zephyr/drivers/sensor/mpu9250/CMakeFiles/drivers__sensor__mpu9250.dir/mpu9250.c.obj -MF zephyr\drivers\sensor\mpu9250\CMakeFiles\drivers__sensor__mpu9250.dir\mpu9250.c.obj.d -o zephyr/drivers/sensor/mpu9250/CMakeFiles/drivers__sensor__mpu9250.dir/mpu9250.c.obj -c C:/ncs/v2.6.0/zephyr/drivers/sensor/mpu9250/mpu9250.c
    In file included from C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_macro.h:34,
    from C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util.h:17,
    from C:/ncs/v2.6.0/zephyr/include/zephyr/sys/cbprintf_internal.h:15,
    from C:/ncs/v2.6.0/zephyr/include/zephyr/sys/cbprintf.h:124,
    from C:/ncs/v2.6.0/zephyr/include/zephyr/logging/log_msg.h:11,
    from C:/ncs/v2.6.0/zephyr/include/zephyr/logging/log_core.h:9,
    from C:/ncs/v2.6.0/zephyr/include/zephyr/logging/log.h:11,
    from C:/ncs/v2.6.0/zephyr/drivers/sensor/mpu9250/mpu9250.c:10:
    C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:89:41: error: '__device_dts_ord_DT_N_S_soc_S_i2c_40003000_S_mpu9250_68_P_irq_gpios_IDX_0_PH_ORD' undeclared here (not in a function)
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:72:26: note: in definition of macro '__DEBRACKET'
    72 | #define __DEBRACKET(...) __VA_ARGS__
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
    64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
    | ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
    59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_macro.h:180:9: note: in expansion of macro 'Z_COND_CODE_1'
    180 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
    | ^~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:4151:9: note: in expansion of macro 'COND_CODE_1'
    4151 | COND_CODE_1(DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT), \
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:69:53: note: in expansion of macro '__DEBRACKET'
    69 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
    64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
    | ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
    59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_macro.h:180:9: note: in expansion of macro 'Z_COND_CODE_1'
    180 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
    | ^~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_macro.h:224:9: note: in expansion of macro 'COND_CODE_1'
    224 | COND_CODE_1(_flag, _code, ())
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/sensor/mpu9250/mpu9250.c:357:9: note: in expansion of macro 'IF_ENABLED'
    357 | IF_ENABLED(CONFIG_MPU9250_TRIGGER, \
    | ^~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/common.h:138:23: note: in expansion of macro '_DO_CONCAT'
    138 | #define _CONCAT(x, y) _DO_CONCAT(x, y)
    | ^~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
    216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/drivers/gpio.h:331:25: note: in expansion of macro 'DEVICE_DT_GET'
    331 | .port = DEVICE_DT_GET(DT_GPIO_CTLR_BY_IDX(node_id, prop, idx)),\
    | ^~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/drivers/gpio.h:393:9: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
    393 | GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), prop, idx)
    | ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/drivers/gpio.h:420:9: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET_BY_IDX'
    420 | GPIO_DT_SPEC_INST_GET_BY_IDX(inst, prop, 0)
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/sensor/mpu9250/mpu9250.c:358:31: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET'
    358 | (.int_pin = GPIO_DT_SPEC_INST_GET(inst, irq_gpios))) \
    | ^~~~~~~~~~~~~~~~~~~~~
    E:/SmartShoeFirmware/mpu6050_2/build/zephyr/include/generated/devicetree_generated.h:11655:53: note: in expansion of macro 'INIT_MPU9250_INST'
    11655 | #define DT_FOREACH_OKAY_INST_invensense_mpu9250(fn) fn(0)
    | ^~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in expansion of macro 'DT_FOREACH_OKAY_INST_invensense_mpu9250'
    105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
    | ^
    C:/ncs/v2.6.0/zephyr/drivers/sensor/mpu9250/mpu9250.c:366:1: note: in expansion of macro 'DT_INST_FOREACH_STATUS_OKAY'
    366 | DT_INST_FOREACH_STATUS_OKAY(INIT_MPU9250_INST)
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    E:/SmartShoeFirmware/mpu6050_2/build/zephyr/include/generated/devicetree_generated.h:11026:40: error: 'DT_N_S_soc_S_i2c_40003000_S_mpu9250_68_P_irq_gpios_IDX_0_VAL_pin' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_i2c_40003000_S_mpu9250_68_P_reg_IDX_0_EXISTS'?
    11026 | #define DT_N_INST_0_invensense_mpu9250 DT_N_S_soc_S_i2c_40003000_S_mpu9250_68
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:72:26: note: in definition of macro '__DEBRACKET'
    72 | #define __DEBRACKET(...) __VA_ARGS__
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
    64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
    | ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
    59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_macro.h:180:9: note: in expansion of macro 'Z_COND_CODE_1'
    180 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
    | ^~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:4151:9: note: in expansion of macro 'COND_CODE_1'
    4151 | COND_CODE_1(DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT), \
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:69:53: note: in expansion of macro '__DEBRACKET'
    69 | #define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
    64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
    | ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
    59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_macro.h:180:9: note: in expansion of macro 'Z_COND_CODE_1'
    180 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
    | ^~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_macro.h:224:9: note: in expansion of macro 'COND_CODE_1'
    224 | COND_CODE_1(_flag, _code, ())
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/sensor/mpu9250/mpu9250.c:357:9: note: in expansion of macro 'IF_ENABLED'
    357 | IF_ENABLED(CONFIG_MPU9250_TRIGGER, \
    | ^~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:1371:9: note: in expansion of macro 'DT_CAT7'
    1371 | DT_CAT7(node_id, _P_, pha, _IDX_, idx, _VAL_, cell)
    | ^~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/devicetree/gpio.h:164:9: note: in expansion of macro 'DT_PHA_BY_IDX'
    164 | DT_PHA_BY_IDX(node_id, gpio_pha, idx, pin)
    | ^~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/drivers/gpio.h:332:24: note: in expansion of macro 'DT_GPIO_PIN_BY_IDX'
    332 | .pin = DT_GPIO_PIN_BY_IDX(node_id, prop, idx), \
    | ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/drivers/gpio.h:393:9: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
    393 | GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), prop, idx)
    | ^~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in expansion of macro 'DT_N_INST_0_invensense_mpu9250'
    105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
    | ^
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:104:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
    104 | #define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
    | ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:334:31: note: in expansion of macro 'UTIL_CAT'
    334 | #define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
    | ^~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/devicetree.h:3319:27: note: in expansion of macro 'DT_INST'
    3319 | #define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
    | ^~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/drivers/gpio.h:393:33: note: in expansion of macro 'DT_DRV_INST'
    393 | GPIO_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), prop, idx)
    | ^~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/include/zephyr/drivers/gpio.h:420:9: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET_BY_IDX'
    420 | GPIO_DT_SPEC_INST_GET_BY_IDX(inst, prop, 0)
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.0/zephyr/drivers/sensor/mpu9250/mpu9250.c:358:31: note: in expansion of macro 'GPIO_DT_SPEC_INST_GET'
    358 | (.int_pin = GPIO_DT_SPEC_INST_GET(inst, irq_gpios))) \
    | ^~~~~~~~~~~~~~~~~~~~~
    E:/SmartShoeFirmware/mpu6050_2/build/zephyr/include/generated/devicetree_generated.h:11655:53: note: in expansion of macro 'INIT_MPU9250_INST'
    11655 | #define DT_FOREACH_OKAY_INST_invensense_mpu9250(fn) fn(0)
    | ^~
    C:/ncs/v2.6.0/zephyr/include/zephyr/sys/util_internal.h:105:36: note: in expansion of macro 'DT_FOREACH_OKAY_INST_invensense_mpu9250'
    105 | #define UTIL_PRIMITIVE_CAT(a, ...) a##__VA_ARGS__
    | ^
    C:/ncs/v2.6.0/zephyr/drivers/sensor/mpu9250/mpu9250.c:366:1: note: in expansion of macro 'DT_INST_FOREACH_STATUS_OKAY'
    366 | DT_INST_FOREACH_STATUS_OKAY(INIT_MPU9250_INST)

  • Could you post your updated overlay and how you define the device in your main file?

    Regards

    Runar

Related