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

Can I measure battery level without any external components nrf51

I want to undestand this. I can't see any examples with it. In the example ble_app_proximity I always received 100% level. If it possible, can anybody give a ADC config example for it? Thanks.

Parents
  • Tnanks. But I still have question- how to init ADC in SDK9? As I understand, I should setting in function

    nrf_adc_input_select()
    

    transfer to it

    NRF_ADC_CONFIG_SCALING_SUPPLY_ONE_THIRD
    

    is it correct?

    function nrf_adc_input_select()

    __STATIC_INLINE void nrf_adc_input_select(nrf_adc_config_input_t input)
    {
    NRF_ADC->CONFIG =
        ((uint32_t)input << ADC_CONFIG_PSEL_Pos) | (NRF_ADC->CONFIG & ~ADC_CONFIG_PSEL_Msk);
    
    if (input != NRF_ADC_CONFIG_INPUT_DISABLED)
    {
        NRF_ADC->ENABLE = ADC_ENABLE_ENABLE_Enabled << ADC_ENABLE_ENABLE_Pos;
    }
    else
    {
        NRF_ADC->ENABLE = ADC_ENABLE_ENABLE_Disabled << ADC_ENABLE_ENABLE_Pos;
    }
    

    }

  • I watched same example in SDK 9. But I can't see config of ADC for internal battery measure. Your link I can't open. Relink pls.

Reply Children
No Data
Related