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

15.2 proximity example, NRFX SAADC driver not updating battery service value

Hello,

I have the proximity example updating the battery service value fine using the provided nrf_drv_saadc.h driver.
When converting the saadc driver to NRFX (nrfx_saadc.h), and repeating the battery service, the value remains at 0x64,
whereas before a value would be say 0x27 when using cr2032 on the DK.
RTT shows normal.

Attached is the revised proximity example for nrfx on SES 832 DK.

thank-you,

ble_app_proximity-2.zip

Parents Reply
  • my bad sorry. 

    I changed the init function to this and checked on my phone to see if I am getting proper battery notifications and it seems to be correct.

    My change was in ad_configure()

    static const nrfx_saadc_config_t default_config = NRFX_SAADC_DEFAULT_CONFIG;
    ret_code_t err_code = nrfx_saadc_init(&default_config, saadc_event_handler);
    
    // ret_code_t err_code = nrfx_saadc_init(NULL, saadc_event_handler);
    // APP_ERROR_CHECK(err_code);

Children
Related