Hello,
I'll explain my project.
I developed a device that take a magnetism sample (with a sensor) each hour, but the device should be available all the time, because an operator could arrives for take the magnetism measures (saved measures). The sensor is in standby all the time except 1 time each hour, so, its consumption shouldn't be important.
Well, my device only was available 10-12 days, the battery is down, and I need that the device works at least 6 months.
I don't know if my configuration is bad. I attached the schematics and my configuration is:
Supply voltage: 3V, battery Lithium coin, CR2032, but can be bigger.
TX power: 4 dBm
For calculating current consumption during advertising:
Advertising interval: 2000 (it's equal to 1.25s, i think)
Continuously advertising or periodically advertising: Continuously advertising
Application processing time for each advertising interval: 0 or minimum, above i explained my objective.
The configuration in my code:
#define APP_ADV_INTERVAL 2000 /**< The advertising interval (in units of 0.625 ms. This value corresponds to 40 ms). */
#define APP_ADV_TIMEOUT_IN_SECONDS 0 /**< The advertising timeout (in units of seconds). */
#define APP_TIMER_PRESCALER 120 /**< Value of the RTC1 PRESCALER register. */
#define APP_TIMER_MAX_TIMERS 30 /**< Maximum number of simultaneously created timers. */
#define APP_TIMER_OP_QUEUE_SIZE 32 /**< Size of timer operation queues. */
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(20, UNIT_1_25_MS) /**< Minimum acceptable connection interval (20 ms), Connection interval uses 1.25 ms units. */
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(75, UNIT_1_25_MS) /**< Maximum acceptable connection interval (75 ms), Connection interval uses 1.25 ms units. */
And my infinite loop is:
static void power_manage(void)
{
uint32_t err_code = sd_app_evt_wait();
APP_ERROR_CHECK(err_code);
}
Any suggestions?
Thank you so much in advance.
Regards