![Silicon Laboratories AN725 Скачать руководство пользователя страница 19](http://html1.mh-extra.com/html/silicon-laboratories/an725/an725_manual_1271719019.webp)
AN725
Rev. 0.1
19
5.3.1. Monitor
The SiM3L1xx devices include a low-power voltage monitor that compares the output of the low power mode
charge pump against a factory-trimmed 0.95 V reference voltage. This monitor can serve as an interrupt, a PM8
wakeup source, and a reset source. It is highly recommended that this monitor be enabled and used as a wakeup
or interrupt source. However, if Equation 2 will always be true under all valid operating conditions, the monitor is
not strictly required. Leaving the monitor disabled introduces the risk that the device could lock-up, requiring an
external reset or power cycle to recover. This can occur if the selected RTC0 oscillator is disturbed and stops
oscillating, thereby causing the charge pump output to fail. Since the charge pump powers the RTC0 oscillators,
the RTC fail notification is not sufficient to detect this condition, and it will not correct itself without external
intervention. The charge pump voltage monitor consumes approximately 15 nA, when enabled.
When used as a wakeup and interrupt source, the charge pump monitor can alert the firmware that the charge
pump output is nearing 0.95 V. This may occur as temperature rises, for example, causing additional thermal
leakage from the PM8 circuitry. The firmware can respond by decreasing the charge pump drive impedance by
increasing CPLOAD, assuming the drive is not yet at its minimum. Otherwise, firmware must either reduce the PM8
load (by disabling RAM banks or other PM8 active modules) or place the charge pump in bypass mode. When
changing the charge pump mode, it is recommended that all digital logic using the RTC0 oscillators be temporarily
disabled. Otherwise, a glitch from the oscillators due to the sudden change in the charge pump output may disturb
the logic’s operation.
5.3.2. Measuring PM8 Charge Pump Current
To measure the charge pump load current, use CMP0 to detect the output voltage of the charge pump during PM8.
This output voltage, combined with an ADC measurement of the VBAT value, can help estimate the present charge
pump load in PM8. To do this:
1. Enable the charge pump with CPLOAD set to 3.
2. Configure the charge pump monitor to wake up and interrupt the device.
3. Configure CMP0 to wake and interrupt the device if the charge pump output voltage is equal to 16 x VBAT/
64 (0x10) using the comparator DAC feature.
4. Schedule an RTC0 alarm to wake and interrupt the device in 1 ms.
5. Enter PM8 and wait for a wakeup event.
6. If the wakeup event occurred from the voltage monitor, this indicates the present VBAT voltage is too low to
operate the charge pump. The charge pump should be configured for bypass mode and this measurement
aborted.
7. If the wakeup event was the comparator, change the CMP0 to compare against 8 x VBAT/64 (0x08).
8. If the wakeup event was the RTC0 alarm, change the CMP0 to compare against 24 x VBAT/64 (0x18).
9. Repeat this process starting at step 4, continuing to change the CMP0 DAC using a successive-
approximation method to obtain a 5-bit digital value for the charge pump output voltage, where 0x1F
corresponds to 31 x VBAT/64.
10. Use the SARADC0 module to measure the voltage on the VBAT input.
11. Calculate the estimated charge pump load current using Equation 1, the VBAT and final CMP0 DAC
value, and the appropriate value for R
CPLOAD
.
If the resulting load current is small enough that the next lowest setting of CPLOAD results in a charge pump output
greater than 0.95 V, this sequence can be repeated with CPLOAD set to 2 to obtain a more accurate measurement
of the load current, and so forth.