Could not able to read SPI (ADXL362) and I2C sensor (BME680) as device_is_ready method fails.

Hi Team,

I am facing issue with reading BME688 and ADXL362 on Custom Board.

I have mapped the dependency and pin mapping as per the documentation and reference videos but could not able to read the sensor data.

I would like to add that i am not able to get the printk output on any com port or RTT port so as part of development i am running blink Led code on my custom device and test that code with different modules so in below case after adding below code i am not able to get Led blinking which shows that below device_is_ready function return with error.

Program stops at below code.

if (!device_is_ready(dev)) {
        printk("sensor: device not ready.\n");
        return -ENODEV;
    }
Parents Reply
  • Hi,

    I have selected pins as define in schematic file.

    Please find pinctrl.dtsi file as below for I2C. and need to know one more thing that can we just invoke any I2C and SPI from any GPIO pins?

    i2c0_default: i2c0_default {
            group1 {
                psels = <NRF_PSEL(TWIM_SDA, 1, 2)>,
                    <NRF_PSEL(TWIM_SCL, 1, 3)>;
            };
        };

        i2c0_sleep: i2c0_sleep {
            group1 {
                psels = <NRF_PSEL(TWIM_SDA, 1, 2)>,
                    <NRF_PSEL(TWIM_SCL, 1, 3)>;
                low-power-enable;
            };
        };
Children
No Data
Related