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

Change advertising interval while accelerometer enabling?

Hi,

i m using my custom nrf52832 beacon.For Battery power, i used accelerometer.i trying to change advertising interval  for non connectable BLE device while accelerometer enable.In IDLE mode i set advertising interval is 5000ms.when  accelerometer is enabled, i changed advertising interval to 500ms for next 5 seconds then back to IDLE mode.My question is while in interrupt mode 350 uA current is taking (advertising interval 500ms).

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "app_timer.h"
#include "nrf_drv_clock.h"
#include "ble_advdata.h"
#include "bsp.h"
#include "nordic_common.h"
#include "nrf_pwr_mgmt.h"
#include "nrf_drv_gpiote.h"
#include "boards.h"
#include "nrf_drv_twi.h"
#include "LIS3DH.h"
//#include "nrf_drv_saadc.h"
//#include "nrf_drv_ppi.h"
#include "nrf_delay.h"
#include "nrf_log.h"
#include "nrf_log_ctrl.h"
#include "nrf_log_default_backends.h"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX