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

RTC calendar

Hi, I need a RTC calendar ble stack on nrf51822 . (turn on the RTC0 on ble stack and get the count, how to setting the rtc wakeup )

which calendar need follow : track of the time (hours, minutes and seconds) and date (day, week,month, year)

i want to do list: 1.setting(every sec) and turn on the RTC0 interrupt 2.when the rtc0 trigger convert the RTC0 count to time. 3.configure the rtc0 wakeup when it is going to system off. 4.write to flash when system goto system off. 5.if wakeup by rtc0 or i/o, read the data from flash . and add rtc0 count ,update the timing and write back to flash. if it wake by rtc0, Then the system go into system off .

Can you give a hint about every steps of RTC calendar?

Parents
  • Hi,

    Note; the app_timer is a library that is softdevice-compatible, but it does not store softdevice events. This library will only run the events setup to use the RTC TICK in your application.

    The MAX_TIMERS define will set how many instances you can have called through the app_timer library, meaning battery_handler, hrm_handler, or other handlers that you may have in your application.

    The OP_QUEUE_SIZE will give you how many of these pending events that you can have queued up at the time. However, this does not mean that you will have many events queued up, as this is application specific. The app_timer library runs in interrupt priority low, on both RTC and software interrupt, so they cannot interrupt each other. If you have other IRQ-sources running on same priority, which consume more time, then you can build up queue-size.

    If you have a situation where your queue size is eaten up, you will get a NRF_ERROR_NO_MEM back

Reply
  • Hi,

    Note; the app_timer is a library that is softdevice-compatible, but it does not store softdevice events. This library will only run the events setup to use the RTC TICK in your application.

    The MAX_TIMERS define will set how many instances you can have called through the app_timer library, meaning battery_handler, hrm_handler, or other handlers that you may have in your application.

    The OP_QUEUE_SIZE will give you how many of these pending events that you can have queued up at the time. However, this does not mean that you will have many events queued up, as this is application specific. The app_timer library runs in interrupt priority low, on both RTC and software interrupt, so they cannot interrupt each other. If you have other IRQ-sources running on same priority, which consume more time, then you can build up queue-size.

    If you have a situation where your queue size is eaten up, you will get a NRF_ERROR_NO_MEM back

Children
No Data
Related