Lines Matching full:rtc
73 NRF_RTC_Type *rtc; member
87 nrfy_rtc_task_trigger(config->rtc, NRF_RTC_TASK_START); in start()
96 nrfy_rtc_task_trigger(config->rtc, NRF_RTC_TASK_STOP); in stop()
105 return nrfy_rtc_counter_get(config->rtc); in read()
167 NRFY_IRQ_PENDING_SET(NRFX_IRQ_NUMBER_GET(config->rtc)); in set_cc_int_pending()
172 * RTC will not generate event if CC value equals COUNTER+1. If such CC is
190 nrfy_rtc_cc_set(config->rtc, chan, val); in handle_next_tick_case()
192 if (nrfy_rtc_counter_get(config->rtc) != now) { in handle_next_tick_case()
195 nrfy_rtc_int_enable(config->rtc, NRF_RTC_CHANNEL_INT_MASK(chan)); in handle_next_tick_case()
207 * - RTC registers are clocked with LF clock (32kHz) and sampled between two
234 NRF_RTC_Type *rtc = config->rtc; in set_cc() local
246 __ASSERT(nrf_rtc_int_enable_check(rtc, int_mask) == 0, in set_cc()
251 now = nrfy_rtc_counter_get(rtc); in set_cc()
259 prev_val = nrfy_rtc_cc_get(rtc, chan); in set_cc()
260 nrfy_rtc_event_clear(rtc, evt); in set_cc()
261 nrfy_rtc_cc_set(rtc, chan, now); in set_cc()
262 nrfy_rtc_event_enable(rtc, int_mask); in set_cc()
266 nrfy_rtc_event_clear(rtc, evt); in set_cc()
269 now = nrfy_rtc_counter_get(rtc); in set_cc()
299 nrfy_rtc_cc_set(rtc, chan, val); in set_cc()
300 now = nrfy_rtc_counter_get(rtc); in set_cc()
328 nrfy_rtc_int_enable(rtc, int_mask); in set_cc()
360 NRF_RTC_Type *rtc = config->rtc; in disable() local
363 nrfy_rtc_event_int_disable(rtc, NRF_RTC_CHANNEL_INT_MASK(chan)); in disable()
364 nrfy_rtc_event_clear(rtc, evt); in disable()
380 NRF_RTC_Type *rtc = nrfx_config->rtc; in ppi_setup() local
388 nrfy_rtc_event_enable(rtc, NRF_RTC_CHANNEL_INT_MASK(chan)); in ppi_setup()
398 nrfy_rtc_subscribe_set(rtc, NRF_RTC_TASK_CLEAR, data->ppi_ch); in ppi_setup()
399 nrfy_rtc_publish_set(rtc, evt, data->ppi_ch); in ppi_setup()
405 evt_addr = nrfy_rtc_event_address_get(rtc, evt); in ppi_setup()
406 task_addr = nrfy_rtc_task_address_get(rtc, NRF_RTC_TASK_CLEAR); in ppi_setup()
426 NRF_RTC_Type *rtc = nrfx_config->rtc; in ppi_free() local
431 nrfy_rtc_event_disable(rtc, NRF_RTC_CHANNEL_INT_MASK(chan)); in ppi_free()
437 nrfy_rtc_subscribe_clear(rtc, NRF_RTC_TASK_CLEAR); in ppi_free()
438 nrfy_rtc_publish_clear(rtc, evt); in ppi_free()
463 NRF_RTC_Type *rtc = config->rtc; in set_fixed_top_value() local
469 nrfy_rtc_int_disable(rtc, NRF_RTC_INT_OVERFLOW_MASK); in set_fixed_top_value()
474 nrfy_rtc_task_trigger(rtc, NRF_RTC_TASK_CLEAR); in set_fixed_top_value()
478 nrfy_rtc_int_enable(rtc, NRF_RTC_INT_OVERFLOW_MASK); in set_fixed_top_value()
488 NRF_RTC_Type *rtc = nrfx_config->rtc; in set_top_value() local
506 nrfy_rtc_int_disable(rtc, NRF_RTC_CHANNEL_INT_MASK(top_ch)); in set_top_value()
521 nrfy_rtc_cc_set(rtc, top_ch, cfg->ticks); in set_top_value()
524 nrfy_rtc_task_trigger(rtc, NRF_RTC_TASK_CLEAR); in set_top_value()
528 nrfy_rtc_task_trigger(rtc, NRF_RTC_TASK_CLEAR); in set_top_value()
533 nrfy_rtc_int_enable(rtc, NRF_RTC_CHANNEL_INT_MASK(top_ch)); in set_top_value()
557 nrfx_config->rtc = nhw_convert_periph_base_addr(nrfx_config->rtc); in init_rtc()
560 NRF_RTC_Type *rtc = nrfx_config->rtc; in init_rtc() local
567 nrfy_rtc_prescaler_set(rtc, prescaler); in init_rtc()
569 NRFY_IRQ_ENABLE(NRFX_IRQ_NUMBER_GET(rtc)); in init_rtc()
606 NRF_RTC_Type *rtc = config->rtc; in top_irq_handle() local
614 uint32_t event_mask = nrfy_rtc_events_process(rtc, NRFY_EVENT_TO_INT_BITMASK(top_evt)); in top_irq_handle()
621 nrfy_rtc_task_trigger(rtc, NRF_RTC_TASK_CLEAR); in top_irq_handle()
635 NRF_RTC_Type *rtc = config->rtc; in alarm_irq_handle() local
639 bool hw_irq_pending = nrfy_rtc_events_process(rtc, NRFY_EVENT_TO_INT_BITMASK(evt)) & in alarm_irq_handle()
640 nrfy_rtc_int_enable_check(rtc, NRFY_EVENT_TO_INT_BITMASK(evt)); in alarm_irq_handle()
648 nrfy_rtc_int_disable(rtc, int_mask); in alarm_irq_handle()
655 uint32_t cc = nrfy_rtc_cc_get(rtc, chan); in alarm_irq_handle()
709 "RTC prescaler out of range"); \
738 .rtc = (NRF_RTC_Type *)DT_INST_REG_ADDR(idx), \