In the ULP Wireless Q magazine (edition winter 2016), on page 12 / 13 there is listed that the nRF52 chips have a Battery Monitor peripheral but I cannot find anything about it in the product specifications. Do you have more information about it?
In the ULP Wireless Q magazine (edition winter 2016), on page 12 / 13 there is listed that the nRF52 chips have a Battery Monitor peripheral but I cannot find anything about it in the product specifications. Do you have more information about it?
Try SAADC (github example) and set SAADC sorce as NRF_SAADC_INPUT_VDD
my saadc callback:
void saadc_callback(nrf_drv_saadc_evt_t const * p_event){
if (p_event->type == NRF_DRV_SAADC_EVT_DONE){
uint32_t err_code;
err_code = nrf_drv_saadc_buffer_convert(p_event->data.done.p_buffer, SAMPLES_IN_BUFFER);
APP_ERROR_CHECK(err_code);
nrf_drv_saadc_uninit();
NRF_SAADC->INTENCLR = (SAADC_INTENCLR_END_Clear << SAADC_INTENCLR_END_Pos);
NVIC_ClearPendingIRQ(SAADC_IRQn);
float battery = (p_event->data.done.p_buffer[0] / 1023.0f) * 3.6f;
char displaybuf[BLE_NUS_MAX_DATA_LEN];
uint8_t chars = 0;
chars = snprintf(displaybuf,BLE_NUS_MAX_DATA_LEN,"%.3f",battery);
ble_nus_string_send(&m_nus, (unsigned char*)displaybuf, chars);
}
}
With the peripheral 'Battery Management' I was thinking about remaining power. This is what I'm realy interested in to give the customer an indication of remaining life time
With the peripheral 'Battery Management' I was thinking about remaining power. This is what I'm realy interested in to give the customer an indication of remaining life time