Interrupt

group group_rtc_interrupt_functions

Functions

void Cy_RTC_Interrupt(cy_stc_rtc_dst_t const *dstTime, bool mode)

The interrupt handler function which should be called in user provided RTC interrupt function.

This is the handler of the RTC interrupt in CPU NVIC. The handler checks which RTC interrupt was asserted and calls the respective RTC interrupt handler functions: Cy_RTC_Alarm1Interrupt(), Cy_RTC_Alarm2Interrupt() or Cy_RTC_DstInterrupt(), and Cy_RTC_CenturyInterrupt().

The order of the RTC handler functions execution is incremental. Cy_RTC_Alarm1Interrupt() is run as the first one and Cy_RTC_CenturyInterrupt() is called as the last one.

This function clears the RTC interrupt every time when it is called.

Cy_RTC_DstInterrupt() function is called instead of Cy_RTC_Alarm2Interrupt() in condition that the mode parameter is true.

note

This function is required to be called in user interrupt handler.

Parameters
  • dstTime: The daylight saving time configuration structure, see cy_stc_rtc_dst_t.

  • mode: False - if the DST is disabled. True - if DST is enabled.

void Cy_RTC_Alarm1Interrupt(void)

A blank weak interrupt handler function which indicates assert of the RTC alarm 1 interrupt.

Function implementation should be defined in user source code in condition that such event handler is required. If such event is not required user should not do any actions.

This function is called in the general RTC interrupt handler Cy_RTC_Interrupt() function.

void Cy_RTC_Alarm2Interrupt(void)

A blank weak interrupt handler function which indicates assert of the RTC alarm 2 interrupt.

Function implementation should be defined in user source code in condition that such event handler is required. If such event is not required user should not do any actions.

This function is called in the general RTC interrupt handler Cy_RTC_Interrupt() function. Cy_RTC_Alarm2Interrupt() function is ignored in Cy_RTC_Interrupt() function if DST is enabled. Refer to Cy_RTC_Interrupt() description.

void Cy_RTC_DstInterrupt(cy_stc_rtc_dst_t const *dstTime)

This is a processing handler against the DST event.

It adjusts the current time using the DST start/stop parameters and registers the next DST event time into the ALARM2 interrupt.

Parameters

void Cy_RTC_CenturyInterrupt(void)

This is a weak function and it should be redefined in user source code in condition that such event handler is required.

By calling this function, it indicates the year reached 2100. It should add an adjustment to avoid the Y2K problem.

Function implementation should be defined in user source code in condition that such event handler is required. If such event is not required user should not do any actions.

uint32_t Cy_RTC_GetInterruptStatus(void)

Returns a status of RTC interrupt requests.

Return

Bit mapping information, see RTC Interrupt sources.

uint32_t Cy_RTC_GetInterruptStatusMasked(void)

Returns an interrupt request register masked by the interrupt mask.

Returns a result of the bitwise AND operation between the corresponding interrupt request and mask bits.

Return

Bit mapping information, see RTC Interrupt sources.

uint32_t Cy_RTC_GetInterruptMask(void)

Returns an interrupt mask.

Return

Bit mapping information, see RTC Interrupt sources.

void Cy_RTC_ClearInterrupt(uint32_t interruptMask)

Clears RTC interrupts by setting each bit.

Parameters

void Cy_RTC_SetInterrupt(uint32_t interruptMask)

Sets a software interrupt request.

Parameters

void Cy_RTC_SetInterruptMask(uint32_t interruptMask)

Configures which bits of the interrupt request register that triggers an interrupt event.

Parameters