Datasheet
2011-2012 Microchip Technology Inc. Preliminary DS41579D-page 231
PIC16(L)F1782/3
24.7 Auto-Shutdown
Auto-shutdown is a method to immediately override
the PSMC output levels with specific overrides that
allow for safe shutdown of the application.
Auto-shutdown includes a mechanism to allow the
application to restart under different conditions.
Auto-shutdown is enabled with the PxASDEN bit of the
PSMC Auto-shutdown Control (PSMCxASDC) register
(Register 24-14). All auto-shutdown features are
enabled when PxASDEN is set and disabled when
cleared.
24.7.1 SHUTDOWN
There are two ways to generate a shutdown event:
• Manual
• External Input
24.7.1.1 Manual Override
The auto-shutdown control register can be used to
manually override the pin functions. Setting the PxASE
bit of the PSMC Auto-shutdown Control (PSMCxASDC)
register (Register 24-14) generates a software
shut-down event.
The auto-shutdown override will persist as long as
PxASE remains set.
24.7.1.2 External Input Source
Any of the given sources that are available for event
generation are also available for system shut-down.
This is so that external circuitry can monitor and force
a shutdown without any software overhead.
Auto-shutdown sources are selected with the PSMC
Auto-shutdown Source (PSMCxASDS) register
(Register 24-16).
When any of the selected external auto-shutdown
sources go high, the PxASE bit is set and an
auto-shutdown interrupt is generated.
24.7.2 PIN OVERRIDE LEVELS
The logic levels driven to the output pins during an
auto-shutdown event are determined by the PSMC
Auto-shutdown Output Level (PSMCxASDL) register
(Register 24-15).
24.7.2.1 PIN Override Enable
Setting the PxASDOV bit of the PSMC Auto-shutdown
Control (PSMCxASDC) register (Register 24-14) will
also force the override levels onto the pins, exactly like
what happens when the auto-shutdown is used.
However, whereas setting PxASE causes an
auto-shutdown interrupt, setting PxASDOV does not
generate an interrupt.
24.7.3 RESTART FROM
AUTO-SHUTDOWN
After an auto-shutdown event has occurred, there are
two ways for the module to resume operation:
• Manual restart
• Automatic restart
The restart method is selected with the PxARSEN bit of
the PSMC Auto-shutdown Control (PSMCxASDC)
register (Register 24-14).
24.7.3.1 Manual Restart
When PxARSEN is cleared, and once the PxASDE bit
is set, it will remain set until cleared by software.
The PSMC will restart on the period event after
PxASDE bit is cleared in software.
24.7.3.2 Auto-Restart
When PxARSEN is set, the PxASDE bit will clear
automatically when the source causing the Reset and
no longer asserts the shut-down condition.
The PSMC will restart on the next period event after
the auto-shutdown condition is removed.
Examples of manual and automatic restart are shown
in Figure 24-20.
Note: The external shutdown sources are level
sensitive, not edge sensitive. The shutdown
condition will persist as long as the circuit is
driving the appropriate logic level.
Note: Whether manual or auto-restart is selected,
the PxASDE bit cannot be cleared in
software when the auto-shutdown condition
is still present.