Issue with Implementing BME680 with nRF5340DK Using I2C Protocol

Hi,

I am working on implementing the BME680 sensor with the nRF5340DK using the I2C protocol. I have successfully obtained the slave device address and the sensor address.

However, I am facing an issue when trying to read data from the sensor; I am unable to fetch any data. I need support to troubleshoot this problem and ensure proper data reading from the BME680 sensor.

Output:

Thank you

Parents
  • Hi,

    The error that you get is complaining about the qspi_nor device and not the BME680 sensor over I2C. What changes did you do to your board files (.dts and .overlay)? Which GPIOs are the I2C device using?

    Kind regards,
    Andreas

  • Hi,

    i2c3 {
        status = "okay";
        pinctrl-0 = <&i2c3_default>;
        pinctrl-1 = <&i2c3_sleep>;
        pinctrl-names = "default", "sleep";
        bme680:bme680@76 {
            compatible = "i2c-device";
            reg = <0x76>;
        };
     
    i2c3_default: i2c3_default {
            group1 {
                psels = <NRF_PSEL(TWIM_SCL, 1, 3)>,
                 <NRF_PSEL(TWIM_SDA, 1, 2)>;
            };
    These are the pin config for I2C.
    &qspi {
        status = "okay";
        pinctrl-0 = <&qspi_default>;
        pinctrl-1 = <&qspi_sleep>;
        pinctrl-names = "default", "sleep";
        w25q32: w25q32@0 {
            compatible = "nordic,qspi-nor";
            reg = <0>;
            /* MX25R64 supports only pp and pp4io */
            //writeoc = "pp4io";
            /* MX25R64 supports all readoc options */
            //readoc = "read4io";
            sck-frequency = <10000000>;
            jedec-id = [ef 40 16];
            //sfdp-bfp = [];
            size = <0x2000000>;
            has-dpd;
            t-enter-dpd = <3000>;
            t-exit-dpd = <30000>;
            writeoc = "pp";
            readoc = "fastread";
        };
    };
     
        qspi_default: qspi_default {
            group1 {
                psels = <NRF_PSEL(QSPI_SCK, 0, 27)>,
                        <NRF_PSEL(QSPI_IO0, 1, 5)>,
                        <NRF_PSEL(QSPI_IO1, 1, 6)>,
                        <NRF_PSEL(QSPI_IO2, 0, 21)>,
                        <NRF_PSEL(QSPI_IO3, 0, 26)>,
                        <NRF_PSEL(QSPI_CSN, 0, 24)>;
                nordic,drive-mode = <NRF_DRIVE_H0H1>;
            };

        };
    These are the pin details Qspi.
     
    Can you explain me the problem in this?
    Thank you.
Reply
  • Hi,

    i2c3 {
        status = "okay";
        pinctrl-0 = <&i2c3_default>;
        pinctrl-1 = <&i2c3_sleep>;
        pinctrl-names = "default", "sleep";
        bme680:bme680@76 {
            compatible = "i2c-device";
            reg = <0x76>;
        };
     
    i2c3_default: i2c3_default {
            group1 {
                psels = <NRF_PSEL(TWIM_SCL, 1, 3)>,
                 <NRF_PSEL(TWIM_SDA, 1, 2)>;
            };
    These are the pin config for I2C.
    &qspi {
        status = "okay";
        pinctrl-0 = <&qspi_default>;
        pinctrl-1 = <&qspi_sleep>;
        pinctrl-names = "default", "sleep";
        w25q32: w25q32@0 {
            compatible = "nordic,qspi-nor";
            reg = <0>;
            /* MX25R64 supports only pp and pp4io */
            //writeoc = "pp4io";
            /* MX25R64 supports all readoc options */
            //readoc = "read4io";
            sck-frequency = <10000000>;
            jedec-id = [ef 40 16];
            //sfdp-bfp = [];
            size = <0x2000000>;
            has-dpd;
            t-enter-dpd = <3000>;
            t-exit-dpd = <30000>;
            writeoc = "pp";
            readoc = "fastread";
        };
    };
     
        qspi_default: qspi_default {
            group1 {
                psels = <NRF_PSEL(QSPI_SCK, 0, 27)>,
                        <NRF_PSEL(QSPI_IO0, 1, 5)>,
                        <NRF_PSEL(QSPI_IO1, 1, 6)>,
                        <NRF_PSEL(QSPI_IO2, 0, 21)>,
                        <NRF_PSEL(QSPI_IO3, 0, 26)>,
                        <NRF_PSEL(QSPI_CSN, 0, 24)>;
                nordic,drive-mode = <NRF_DRIVE_H0H1>;
            };

        };
    These are the pin details Qspi.
     
    Can you explain me the problem in this?
    Thank you.
Children
No Data
Related