26.5.8 Waveform Generation

Waveforms can be generated in order to take advantage of the RTC inherent prescalers while the RTC is the only powered circuitry (Low-power mode of operation, Backup mode) or in any active mode. Entering Backup or Low-power operating modes does not affect the waveform generation outputs.

The outputs RTCOUT0 and RTCOUT1 can be configured to provide several types of waveforms. The figure below illustrates the different signals available to generate RTCOUT0 and RTCOUT1.

The RTC waveforms are internally routed to ADC trigger events and those events have a source driver selected among five possibilities. Two different triggers can be generated at a time, the first one is configurable in RTC_MR.OUT0, while the second trigger is configurable in RTC_MR.OUT1. RTC_MR.OUT0 manages the trigger for channel AD[n:0] (where n is the higher index available (last channel)), while RTC_MR.OUT1 manages the channel AD[n] only for specific modes. Refer to ADC_MR.TRGSEL in section “Analog-to-Digital Converter (ADC) Controller” for selection of the measurement triggers and associated modes of operation.

When RTC_MR.OUTx is set to 0, the associated output is stuck at 0 (reset value that can be used at any time to disable the waveform generation).

When RTC_MR.OUTx is set to 5, a toggling signal is provided when the RTC alarm is reached.

When RTC_MR.OUTx is set to 6, a copy of the alarm flag is provided, so the associated output is set high (logical 1) when an alarm occurs and immediately cleared when software clears the alarm interrupt source.

Figure 26-8. Waveform Generation