2022-09-26 06:15 AM
Hello everyone,
board consume too much energy when the acc wakeup and start to measure the tilt.
in Stop Mode : 5 uA
in Wake up : 280 uA
MCU setting for INT pin belong to acc : No pull up-down and rising-edge trigger
for CS pin push-pull and no pull up-down for MCU and for acc is pull up disconnection.
Is this current normal for operation according to code below
dev_ctx.write_reg = platform_write;
dev_ctx.read_reg = platform_read;
dev_ctx.handle = SPI1;
delay_ms(k_BOOT_TIME);
ais2dw12_device_id_get(&dev_ctx, &whoamI);
if (whoamI != AIS2DW12_ID)
while (1);
/* Restore default configuration */
ais2dw12_reset_set(&dev_ctx, PROPERTY_ENABLE);
do
{
ais2dw12_reset_get(&dev_ctx, &rst);
} while (rst);
/* Start device configuration. */
ais2dw12_i2c_interface_set(&dev_ctx, AIS2DW12_I2C_DISABLE);
ais2dw12_spi_mode_set(&dev_ctx, AIS2DW12_SPI_4_WIRE);
ais2dw12_cs_mode_set(&dev_ctx, AIS2DW12_PULL_UP_DISCONNECT);
// ais2dw12_pin_polarity_set(&dev_ctx, AIS2DW12_ACTIVE_LOW);
// ais2dw12_pin_mode_set(&dev_ctx, AIS2DW12_OPEN_DRAIN);
ais2dw12_data_rate_set(&dev_ctx, AIS2DW12_XL_ODR_25Hz);
// ais2dw12_data_ready_mode_set(&dev_ctx, AIS2DW12_DRDY_PULSED);
ais2dw12_full_scale_set(&dev_ctx, AIS2DW12_2g);
// ais2dw12_filter_path_set(&dev_ctx, AIS2DW12_LPF_ON_OUT);
// ais2dw12_filter_bandwidth_set(&dev_ctx, AIS2DW12_ODR_DIV_4);
ais2dw12_power_mode_set(&dev_ctx, AIS2DW12_PWR_MD_12bit);
ais2dw12_wkup_dur_set(&dev_ctx, 1); // x * (1/ODR) = 40 ms
ais2dw12_act_sleep_dur_set(&dev_ctx, 0); // 16*1/ODR = 640 ms
ais2dw12_wkup_threshold_set(&dev_ctx, 4); // 4*(FS/64) = 125 mg
// ais2dw12_wkup_feed_data_set(&dev_ctx, AIS2DW12_HP_FEED);
//set act-inact mode
ais2dw12_act_mode_set(&dev_ctx, AIS2DW12_DETECT_ACT_INACT);
ais2dw12_pin_int1_route_get(&dev_ctx, &int_route.ctrl4_int1);
int_route.ctrl4_int1.int1_wu = PROPERTY_ENABLE;
ais2dw12_pin_int1_route_set(&dev_ctx, &int_route.ctrl4_int1);
2022-10-12 07:59 AM
hello, I have the same problem. Did you solve the problem?
2022-10-27 02:04 AM
Because of internal pull-up on communication line.