LIS2DW12 can't read/fetch any data

Hi, 

I have LIS2DW12 (Gravity board) connected to my NRF54L15-DK with the following overlay:

&pinctrl {
    /* Pin control for I2C21 */
    i2c21_default: i2c21_default {
        group1 {
            /* TWIM function selects + pins: port 1, pins 11 and 10 */
            psels = <NRF_PSEL(TWIM_SDA, 1, 11)>,
                <NRF_PSEL(TWIM_SCL, 1, 10)>;
        };
    };

      /* I2C21 sleep (low-power) state */
    i2c21_sleep: i2c21_sleep {
        group1 {
            /* Keep the same psels, but no drive strength/pulls */
            psels = <NRF_PSEL(TWIM_SDA, 1, 11)>,
                    <NRF_PSEL(TWIM_SCL, 1, 10)>;
            /* Intentionally no drive-open-drain / no bias-* here */
        };
    };
};

&i2c21 {
    status = "okay";
    clock-frequency = <I2C_BITRATE_FAST>;   /* 400 kHz; change to _STANDARD if you prefer */
    pinctrl-0 = <&i2c21_default>;
    pinctrl-1 = <&i2c21_sleep>;
    pinctrl-names = "default", "sleep";
    /* LIS2DW12 accelerometer on 0x19 (SA0 high). Use 0x18 if SA0 is low. */
    lis2dw12@18 {
        compatible = "st,lis2dw12";
        reg = <0x18>;
        status = "okay";        
    };
};
In my I code, I have it properly retrieved, initialized and configured for 100 Hz sampling:
    lis2dw12_dev = DEVICE_DT_GET_ONE(st_lis2dw12);
    if (lis2dw12_dev == NULL) {
            LOG_ERR("No LIS2DW12 device found in device tree");
            return -ENODEV;
        }
   
    LOG_INF("Found LIS2DW12 device");
   
    if (!device_is_ready(lis2dw12_dev)) {
        LOG_ERR("LIS2DW12 device not ready");
        return -ENODEV;
    }
   
    struct sensor_value odr = {.val1 = 100, .val2 = 0};  // 100 Hz
    struct sensor_value fs = {.val1 = 2, .val2 = 0};         // ±2g
   
    if (sensor_attr_set(lis2dw12_dev, SENSOR_CHAN_ACCEL_XYZ,
                        SENSOR_ATTR_SAMPLING_FREQUENCY, &odr) < 0) {
        LOG_WRN("Failed to set ODR - using default");
    } else {
        LOG_INF("Set ODR to 100 Hz");
    }
   
    if (sensor_attr_set(lis2dw12_dev, SENSOR_CHAN_ACCEL_XYZ,
                        SENSOR_ATTR_FULL_SCALE, &fs) < 0) {
        LOG_WRN("Failed to set full scale - using default");
    } else {
        LOG_INF("Set full scale to ±2g");
    }

   Then in the main loop, I am trying to read some data from the sensor:

  // Fetch the latest sensor sample
    int err = sensor_sample_fetch_chan(lis2dw12_dev, SENSOR_CHAN_ACCEL_XYZ);
   
    if (err<0){
        LOG_ERR("Failed to fetch accelerometer sample: %d", err);
        return -EIO;
    }
   
    if (sensor_channel_get(lis2dw12_dev, SENSOR_CHAN_ACCEL_XYZ, accel) < 0) {
        LOG_ERR("Failed to get accelerometer XYZ channel");
        return -EIO;
    }
   Both calls work fine, however, I am not getting any data into accel structure - readings are always zero.
If I switch from sensor_sample_fetch_chan to sensor_sample_fetch call - I get an error code -134 and debug message saying "Channel not supported" which is coming directly from the driver.
I have also tried reading DIE_CAST_TEMPERATURE from the same sensor and IT WORKS JUST FINE! So the only issue is with accelerometer data.
I am struggling to understand why I can't see any data from the accelerometer as everything seems to be clearly working and communicating (I have tried switching register or swapping SDL/SDA wires and in this case, as expected, I was not able to initialize the device).
I have noticed that similar issue regarding error code -134 has been previously reported by one of the users before, however, there was no clear answer why it is being reported.
From what I see, sensor_sample_fetch_chan() should be reporting back data, but it is NOT!
 
Please help... 
Thanks in advance. 
WBR,
Alex
Related