18.2.4 End Event 2 (E2)

The value written to the APMEND2 register determines the number of counts of the internal 24-bit offset counter before the End 2 Event occurs. When the offset counter equals the value written to the APMEND2 register, the analog peripherals selected using the APMPERE2 register will be deactivated and transition back to a low-power state.

Additionally, when APMEND2 and the offset counter are equal (End 2 Event), the offset counter is stopped and reset until it is reactivated when a Start 1 Event occurs (APMSTART1 = APMPER). This means that if the Start 2 or End 1 Events are programmed to occur after the End 2 Event, they will never occur since the offset counter stops counting after an End 2 Event.

Tip: When using the Analog Peripheral Manager with one of the internal clock sources, the maximum amount of time that an analog module can remain active before the 24-bit internal offset counter rolls over is approximately 8.9 minutes. This time period is determined based on an application that uses LFINTOSC (31 kHz), which is the slowest available internal APM clock source.