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

ADC Conversion using 4096Hz for nRF52832 Chip?

Hello Sir,

We are using nRF52832 chip and Softdevice is S132. Is it possible to sample an analog signal using internal ADC conversion using 4096Hz?. Its look like it does at 3900Hz.

Thanks in Advance..

Parents
  • Hi,

    If you trigger sampling through PPI on an RTC event, it should be possible to achieve 4096 Hz. The RTC runs at 32.768 kHz, and a CC value of 8 should give you your desired frequency. If you are triggering sampling from interrupt event, the softdevice might delay sampling if higher priority events occurs, giving you a lower sample rate than expected.

    Note this issue if you are triggering sampling through PPI, and have multiple SAADC channels enabled.

    [EDIT]: Added main.c file that implements sampling triggered by RTC over PPI in ble_app_uart__saadc_timer_driven__scan_mode example: main.c

    Best regards,

    Jørgen

  • Thanks Jorgen, As per you told me i changed the function is

    uint32_t timer_compare_event_addr = rf_drv_rtc_event_address_get(&rtc,NRF_RTC_EVENT_COMPARE_0);
    

    it give error for &m_timer unresolve So i uncomment in my code is

    static const nrf_drv_timer_t   m_timer = NRF_DRV_TIMER_INSTANCE(3); 
    

    but it for timer peripheral. NRF_Timer frequency as sampling rate but this all parameter is use for timer peripheral is it write. What should i do for other parameter like NRF timer frequency sampling rate etc. If i set same as it is and sampling rate set is 125ms. Then i have test this function but it consume lots power it near about 5.56mA while BLE broadcasting. When transmitting adc value to android app at that time peak current is 7.2mA. Why this more power consume?

Reply
  • Thanks Jorgen, As per you told me i changed the function is

    uint32_t timer_compare_event_addr = rf_drv_rtc_event_address_get(&rtc,NRF_RTC_EVENT_COMPARE_0);
    

    it give error for &m_timer unresolve So i uncomment in my code is

    static const nrf_drv_timer_t   m_timer = NRF_DRV_TIMER_INSTANCE(3); 
    

    but it for timer peripheral. NRF_Timer frequency as sampling rate but this all parameter is use for timer peripheral is it write. What should i do for other parameter like NRF timer frequency sampling rate etc. If i set same as it is and sampling rate set is 125ms. Then i have test this function but it consume lots power it near about 5.56mA while BLE broadcasting. When transmitting adc value to android app at that time peak current is 7.2mA. Why this more power consume?

Children
No Data
Related