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

NRF52840 when using Timer and BLE services I found a problem

when using the TIMER,  I set the TIMER's time_ticks=53328 which means that every 3.33ms, the TIMER will call its callback function and start ADC sample. However,  when I use BLE services and TIMER at the same time, I found that ADC cannot be triggered every 3.33ms precisely and the error is about 1%. The crystal oscillator I use is 32MHZ and I thought the error should not be so big. So whether the BLE services will affect the accuracy of  TIMER when using them at the same time?

Parents Reply
  • Almost the ble case with softdevice. The examples are applied the RTC1 timer for timer handling ( Because SD occupied RTC0). I re-command that you may refer the time handling example.

    app_timer2.c 

    app_timer_init(()

    app_timer_create()

    app_timer_start()

    app_timer_stop()

    or the app_buton.c  button timer handling method that can fix your problems.

    But I doubt that if the ADC sampling timer is more longer. Why the value accuracy is bad?

     

Children
Related