pic32mx320f064h Microchip Technology Inc., pic32mx320f064h Datasheet - Page 487

no-image

pic32mx320f064h

Manufacturer Part Number
pic32mx320f064h
Description
64/100-pin General Purpose, 32-bit Flash Microcontrollers
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
pic32mx320f064h-40I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-40I/PT
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
pic32mx320f064h-40V/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-80I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-80V/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064hT-40I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
26.3
The WDT will cause an NMI or a device Reset when it
expires. The Power Save mode of the device
determines which event occurs. The PWRT does not
generate interrupts or Resets.
26.3.1
When the WDT expires and the device is not in Sleep
or Idle, a device Reset is generated. The CPU code
execution jumps to the device Reset vector and the
Registers and Peripherals are forced to their Reset
values.
To detect a WDT Reset, the WDTO (RCON<4>),
SLEEP (RCON<3>) and IDLE (WDTCON<2>) bits
must be tested. If the WDTO bit is a ‘1’, the event was
do to a WDT time-out. The SLEEP and IDLE bits can
then be tested to determine if the WDT event occurred
while the device was awake or if it was in Sleep or Idle.
EXAMPLE 26-1:
© 2007 Microchip Technology Inc.
//This code fragment assumes the WDT was not enabled by the device configuration
// The Postscaler value must be set with the device configuration
WDTCONSET = 0x8000;// Turn on the WDT
main
{
}
Interrupts and Resets
WDTCONSET = 0x01;// Service the WDT
... User code goes here ...
WATCHDOG TIMER RESET
SAMPLE WDT INITIALIZATION AND SERVICING
Advance Information
26.3.2
When the WDT expires in Sleep or Idle, a NMI is gen-
erated. The NMI causes the CPU code execution to
jump to the device Reset vector. Though the NMI share
the same vector as a device Reset, registers and
peripherals are not reset.
To detect a wake from a Power Save mode by WDT, the
WDTO (RCON<4>), SLEEP (RCON<3>) and IDLE
(WDTCON<2>) bits must be tested. If the WDTO bit is
a ‘1’ the event was caused by a WDT time-out. The
SLEEP and IDLE bits can then be tested to determine
if the WDT event occurred in Sleep or Idle.
To cause a WDT time-out in Sleep to act like an inter-
rupt, a return from interrupt instruction may be used in
the start-up code after the event was determined to be
a WDT wake-up. This will cause code execution to
continue with the opcode following the WAIT instruction
that put the device into Power Save mode.
Example 26-1.
WATCHDOG TIMER NMI
PIC32MX
DS61143-page 485
See

Related parts for pic32mx320f064h