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

Timer or RTC for 5 - 60 sec delay

Hi All, I am using the Nordic nRF52 nrf52832 device to read a value in from an Android device. The value will be between 5 and 60 seconds. I'm using the experimental_ble_app_blinky to control the BLE side of things. Is it best to use RTC or will a simple delay do the job. Thanks

Parents
  • Thanks endnode, I'm using s132 and can't find app_timer in the examples. There is an example for rtc in peripherals, but when I port into my code I get the following compiler errors:

    ......\main.c(199): error: #20: identifier "RTC_DEFAULT_CONFIG_FREQUENCY" is undefined nrf_drv_rtc_config_t config = RF_DRV_RTC_DEFAULT_CONFIG; ......\main.c(199): error: #20: identifier "RTC_DEFAULT_CONFIG_IRQ_PRIORITY" is undefined nrf_drv_rtc_config_t config = RF_DRV_RTC_DEFAULT_CONFIG; ......\main.c(199): error: #20: identifier "RTC_DEFAULT_CONFIG_RELIABLE" is undefined nrf_drv_rtc_config_t config = RF_DRV_RTC_DEFAULT_CONFIG; ......\main.c(199): error: #20: identifier "NRF_MAXIMUM_LATENCY_US" is undefined

  • Go to root of SDK and search for app_timer.. or let me do it for you: components\libraries\timer\. Now how to use this library you can see in many example projects, just search for app_timer_init in all *.c files (my search shows over 90 matches;)

Reply Children
No Data
Related