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:
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.
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.