18.3 Analog Peripheral Manager Setup
Use the following steps as a guide for configuring the Analog Peripheral Manager module. Refer to Figure 1 for more information about the APM module timing and operation.
- Select the APM clock source using the APMCLK register.
- Setup the 16-bit APM counter by configuring the prescaler using APMPRE and the period using APMPER to meet the application timing requirements.
- Set the Start 1 Event time by writing to the APMSTART1 register.
- Select which analog peripheral(s) will be activated after a Start 1 Event occurs, by setting the respective bit(s) in the APMPERS1 register.
- Set the End 1 Event time by writing to the APMEND1 register.
- Select which analog peripheral(s) will be deactivated and transitioned back into a low-power state (until reactivated again by the APM) after an End 1 Event occurs, by setting the respective bit(s) in the APMPERE1 register.
- Set the Start 2 Event time by writing to the APMSTART2 register.
- Select which analog peripheral(s) will be activated after a Start 2 Event occurs, by setting the respective bit(s) in the APMPERS2 register.
- Set the End 2 Event time by writing to the APMEND2 register.
- Select which analog peripheral(s) will be deactivated and transitioned back into a low-power state (until reactivated again by the APM) after an End 2 Event occurs, by setting the respective bit(s) in the APMPERE2 register.
- Enable the APM module by setting the EN bit.