BME680 sensor

Post Reply
philculverhouse
Posts: 9
Joined: 02 Aug 2022, 13:53

23 Jul 2023, 16:53

Hi,

I am trying to get the chip ID of the BME680 sensor on my NuMaker_IoT_M487 board using the hardwired I2C interface.

I have tried both 7bit & 8bit addressing in a simple I2C C++ example. I cannot read the ID properly. I only get 0x00.

What am I doing wrong, please?

Code snippet:

#include "mbed.h"
I2C i2c(I2C_SDA , I2C_SCL );

// Set to BME680 sensor I2C address
const int addr7bit = 0x76; // 7 bit I2C address
const int addr8bit = 0x76 << 1; // 8bit I2C address

int main() {

char cmd=0;
char result=0;

while (1) {

cmd = 0xD0;
i2c.write(addr7bit, &cmd, 1);
i2c.read (addr7bit, &result, 1);
printf("BME68X_CHIP_ID 7bit = %hhx\n", result);

wait_us(500000);

cmd = 0xD0; //CHIP_ID
i2c.write(addr8bit, &cmd, 1);
i2c.read (addr8bit, &result, 1);
printf("BME68X_CHIP_ID 8bit = %hhx\n", result);

wait_us(500000);
}
}

morgandu
Posts: 45
Joined: 28 Apr 2017, 22:47

24 Jul 2023, 13:43

Could you please try the example?
https://os.mbed.com/teams/Nuvoton/code/ ... 0-example/

There is a BME680 on NuMaker-IoT-M263A board, so we provided this example to read it.
However, it is easy to apply to other NuMaker IoT board if BME680 has connected to I2C pins.
  • Import this example to your tool (Mbed Studio, CLI, or Keil Studio Cloud)
  • Select target board to NuMaker-IoT-M487
  • Build it.

philculverhouse
Posts: 9
Joined: 02 Aug 2022, 13:53

24 Jul 2023, 19:37

Silly me!

I misunderstood. There is no BME680 on the M487. I was confused by the schematic diagram that shows U7 is connected to the processor.
BUT, U7 does not exist on the NuMake_IoT_M487. The location is un-populated.

So, close this request for support.

Phil

philculverhouse
Posts: 9
Joined: 02 Aug 2022, 13:53

24 Jul 2023, 22:41

I guess I pose the question.

Are Nuvoton going to populate the M487 with U7, giving it the BME680 sensor capabilities?????

regards

Phil

morgandu
Posts: 45
Joined: 28 Apr 2017, 22:47

25 Jul 2023, 09:37

The current NuMaker-IoT-M487 board is version 1.3. So far as I know, there are no plans for updates in the near future. Therefore, the BME680 will not be placed on the board.

philculverhouse
Posts: 9
Joined: 02 Aug 2022, 13:53

25 Jul 2023, 17:05

Hi,

If you look at the v1.3 PCB you can see that there is a space and the pads for the BME680. For some reason the PCB was not assembled with that part placed in position U7.

So, it does not require a board revision from what I can see. Unless there are missing some I2C wire pull-up resistors, as I could not see any on the schematic published in UM_NuMaker-IoT-M487_User_Manual_EN_Rev1.01.pdf

Phil

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 78 guests