nrf52840 issue with VL53L1X error -15

When i flash i always get the this error: before this i had an another sensor the VL53L0X which worked perfectly. 


[0Sensor device not ready!
0:00:00.254,119] <err> VL53L1X: Failed to read
[00:00:00.254,150] <err> VL53L1X: [VL53L1X] VL53L1X_DataInit return error (-15)

/* File: boards/nrf52840_disable_unused.overlay */

/ {
chosen {
/* Keep UART0 only if you need console logging */
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
};
};

/* --- I2C0: Enabled for VL53L1X --- */
&i2c0 {
compatible = "nordic,nrf-twi";
status = "okay";

clock-frequency = <I2C_BITRATE_FAST>;
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";

st_sensor: vl53l1x@29 {
compatible = "st,vl53l1x";
reg = <0x29>;
label = "VL53L1X";
status = "okay";
xshut-gpios = <&gpio0 4 (GPIO_ACTIVE_LOW)>;
};
};

/* --- PIN configuration --- */
&pinctrl {
/omit-if-no-ref/ i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
<NRF_PSEL(TWIM_SCL, 0, 27)>;
};
};

/omit-if-no-ref/ i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 26)>,
<NRF_PSEL(TWIM_SCL, 0, 27)>;
low-power-enable;
};
};
};

/* --- Disable unused peripherals --- */

/* Disable extra I2C buses */
&i2c1 {
status = "disabled";
};

/* Disable SPI buses */
&spi0 {
status = "disabled";
};

&spi1 {
status = "disabled";
};

&spi2 {
status = "disabled";
};

/* Disable PWM */
&pwm0 {
status = "disabled";
};
&pwm1 {
status = "disabled";
};
&pwm2 {
status = "disabled";
};
&pwm3 {
status = "disabled";
};

/* Disable ADC */
&adc {
status = "disabled";
};

/* Disable USB (enable if you need USB CDC or DFU) */
&usbd {
status = "disabled";
};

/* Disable NFC (uses P0.09 and P0.10 pins) */
&nfct {
status = "disabled";
};

/* Disable QSPI (external flash interface) */
&qspi {
status = "disabled";
};

/* Disable extra UARTs (keep uart0 if you need console) */
&uart1 {
status = "disabled";
};
# =========================================================
# System Configuration
# =========================================================
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_REBOOT=y

# =========================================================
# Logging / Console
# =========================================================
CONFIG_LOG=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_PRINTK=y

# =========================================================
# Bluetooth (BLE) Peripheral Setup
# =========================================================
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DIS=y
CONFIG_BT_DEVICE_NAME="smarttupple"
CONFIG_BT_DEVICE_APPEARANCE=833
CONFIG_BT_MAX_CONN=1

# Power-efficient connection parameters
CONFIG_BT_PERIPHERAL_PREF_MIN_INT=80
CONFIG_BT_PERIPHERAL_PREF_MAX_INT=320
CONFIG_BT_PERIPHERAL_PREF_LATENCY=4
CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=500

# Advertising & connection behavior
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=y

# Optional TX power reduction for power saving
# CONFIG_BT_CTLR_TX_PWR_MINUS_12=y

# Disable unused security to simplify and save resources
# CONFIG_BT_SMP is disabled
# CONFIG_BT_PRIVACY is disabled
# CONFIG_BT_SETTINGS is disabled

# =========================================================
# Flash / NVS (for persistent settings)
# =========================================================
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y

# =========================================================
# Sensor (VL53L1X) and I2C
# =========================================================
CONFIG_I2C=y
CONFIG_GPIO=y
CONFIG_SENSOR=y
CONFIG_VL53L1X=y

# =========================================================
# Power Management
# =========================================================
#CONFIG_PM=y
#CONFIG_PM_DEVICE=y
#CONFIG_PM_DEVICE_RUNTIME=y
#CONFIG_PM_DEVICE_POWER_DOMAIN=y



# =========================================================
# Disable unused drivers to save power
# =========================================================
# These should be disabled in your overlay or Kconfig fragments
CONFIG_SPI=n
CONFIG_PWM=n
CONFIG_ADC=n
CONFIG_DAC=n
CONFIG_I2S=n
CONFIG_WIFI=n
CONFIG_LORA=n
Related