This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Current consumption of 3-4 mA while interfacing bme280 sensor

Hello,

I am using sdk 12.2 and nrf52832 customized boards. I have interfaced bme 280 with nrf52 customized boards. My challenge is I am getting 3-4 mA current when I am calling calibration functions for bme280. 

I am attaching my main.c file as as well as read and write functions for bme280.

Please suggest me how can I reduce current?

// write 1 byte to the i2c register at the given address (see table 11 in the LSM9DS0 spec)
ret_code_t write16(uint8_t reg, uint8_t value)
{
ret_code_t ret_code;
uint8_t data[3];
data[0] = reg;
data[1] = value;

nrf_delay_ms(10);



ret_code = nrf_drv_twi_tx(&m_twi,0x76,data, 2, false);
APP_ERROR_CHECK(ret_code);
nrf_delay_ms(10);

return ret_code;

}

uint8_t read16(uint16_t reg)

{

uint16_t value;
nrf_delay_ms(10);

read_sensor_data(0x76,reg,(uint8_t*)&value, sizeof(value));

nrf_delay_ms(10);

return value;

}

Thanks,

Shailavmain.c

Related