Section 08. Reset - dsPIC33F FRM

Section 8. Reset
HIGHLIGHTS
This section of the manual contains the following major topics:
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9
8.10
Introduction .................................................................................................................... 8-2
Control Registers ........................................................................................................... 8-3
System Reset................................................................................................................. 8-6
Using the RCON Status Bits ........................................................................................ 8-11
Device Start-Up Time Lines ......................................................................................... 8-12
Special Function Register Reset States....................................................................... 8-14
Register Maps.............................................................................................................. 8-15
Design Tips .................................................................................................................. 8-16
Related Application Notes............................................................................................ 8-17
Revision History ........................................................................................................... 8-18
8
Reset
© 2009 Microchip Technology Inc.
DS70192C-page 8-1
dsPIC33F Family Reference Manual
8.1
INTRODUCTION
The Reset module combines all the reset sources, and controls the device Master Reset Signal,
SYSRST. The device Reset sources are listed as follows:
•
•
•
•
•
•
Power-on Reset (POR)
Brown-out Reset (BOR)
Master Clear Pin Reset (MCLR)
RESET Instruction (SWR)
Watchdog Time-out Reset (WDTO)
Configuration Mismatch (CM) Reset (This reset source is not available on all devices. Refer
to the specific device data sheet for more details.)
• Trap Conflict Reset (TRAPR)
• Illegal Condition Device Reset (IOPUWR)
- Illegal Opcode Reset
- Uninitialized W Register Reset
- Security Reset
A simplified block diagram of the Reset module is shown in Figure 8-1. Any active source of reset
will make the SYSRST signal active. On system Reset, some of the registers associated with the
CPU and peripherals are forced to a known Reset state, while some are unaffected.
Note:
Figure 8-1:
Refer to the specific peripheral section or refer to Section 2. “CPU” (DS70204) in
the “dsPIC33F Family Reference Manual” for more details on the register Reset
states.
Reset System Block Diagram
RESET Instruction
Glitch Filter
MCLR
WDT
Module
Sleep or Idle
BOR
Internal
Regulator
SYSRST
VDD
VDD Rise
Detect
POR
Trap Conflict
Illegal Opcode
Uninitialized W Register
Configuration Mismatch(1)
Note 1:
DS70192C-page 8-2
The configuration mismatch is not available on all the devices. Refer to the specific device
data sheet for more details.
© 2009 Microchip Technology Inc.
Section 8. Reset
8.2
CONTROL REGISTERS
All types of device Reset set a corresponding status bit in the RCON register to indicate the type
of Reset (see Register 8-1). A POR clears all bits except for the POR and BOR bits
(RCON<1:0>), which are set. The user-assigned application can set or clear any bit at any time
during code execution. The RCON bits only serve as status bits. Setting a particular Reset status
bit in software will not cause a device Reset.
The RCON register also contains bits associated with the Watchdog Timer and device power- saving
states. Refer to Section 9. “Watchdog Timer and Power-Saving Modes” (DS70196) in the
“dsPIC33F Family Reference Manual” for more details.
8
Reset
© 2009 Microchip Technology Inc.
DS70192C-page 8-3
dsPIC33F Family Reference Manual
RCON: Reset Control Register (1)
Register 8-1:
R/W-0
R/W-0
TRAPR
IOPUWR
U-0
—
U-0
U-0
—
—
U-0
—
R/W-0
CM
(2)
R/W-0
VREGS
bit 15
bit 8
R/W-0
EXTR
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/W-1
R/W-1
SWR
SWDTEN(3)
WDTO
SLEEP
IDLE
BOR
POR
bit 7
bit 0
Legend:
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
bit 15
TRAPR: Trap Reset Flag bit
1 = Trap Conflict Reset has occurred
0 = Trap Conflict Reset has not occurred
bit 14
IOPUWR: Illegal Opcode or Uninitialized W Access Reset Flag bit
1 = An illegal opcode detection, an illegal address mode or an uninitialized W register used as an
Address Pointer caused a Reset
0 = An illegal opcode or uninitialized W register Reset has not occurred
bit 13-10
Unimplemented: Read as ‘0’
bit 9
CM: Configuration Mismatch Flag bit(2)
1 = Configuration mismatch Reset has occurred
0 = Configuration mismatch Reset has not occurred
bit 8
VREGS: Voltage Regulator Standby During Sleep bit
1 = Voltage regulator is active during Sleep
0 = Voltage regulator goes into Standby mode during Sleep
bit 7
EXTR: External Reset (MCLR) Pin bit
1 = Master Clear (pin) Reset has occurred
0 = Master Clear (pin) Reset has not occurred
bit 6
SWR: Software Reset (Instruction) Flag bit
1 = RESET instruction has executed
0 = RESET instruction has not executed
bit 5
SWDTEN: Software Enable/Disable of WDT bit(3)
1 = WDT is enabled
0 = WDT is not enabled
bit 4
WDTO: Watchdog Time-out Flag bit
1 = WDT time-out has occurred
0 = WDT time-out has not occurred
bit 3
SLEEP: Wake-up from Sleep Flag bit
1 = Device was in Sleep mode
0 = Device was not in Sleep mode
Note 1: All of the Reset status bits can be set or cleared in software. Setting one of these bits in software does not
cause a device Reset.
2: The configuration mismatch Reset flag is not available on all the devices. Refer to the specific device data
sheet for more details.
3: If the FWDTEN Configuration bit is ‘1’ (unprogrammed), the WDT is always enabled, regardless of the
SWDTEN bit setting.
DS70192C-page 8-4
© 2009 Microchip Technology Inc.
Section 8. Reset
Register 8-1:
RCON: Reset Control Register (Continued)(1)
bit 2
IDLE: Wake-up from Idle Flag bit
1 = Device was in Idle mode
0 = Device was not in Idle mode
bit 1
BOR: Brown-out Reset Flag bit
1 = Brown-out Reset has occurred
0 = Brown-out Reset has not occurred
bit 0
POR: Power-on Reset Flag bit
1 = Power-on Reset has occurred
0 = Power-on Reset has not occurred
Note 1: All of the Reset status bits can be set or cleared in software. Setting one of these bits in software does not
cause a device Reset.
2: The configuration mismatch Reset flag is not available on all the devices. Refer to the specific device data
sheet for more details.
3: If the FWDTEN Configuration bit is ‘1’ (unprogrammed), the WDT is always enabled, regardless of the
SWDTEN bit setting.
8
Reset
© 2009 Microchip Technology Inc.
DS70192C-page 8-5
dsPIC33F Family Reference Manual
8.3
SYSTEM RESET
The dsPIC33F family of devices consists of two types of Reset:
• Cold Reset
• Warm Reset
A cold Reset is the result of a POR or BOR. On a cold Reset, the FNOSC configuration bits in
the FOSC device configuration register select the device clock source.
A warm Reset is the result of all other reset sources, including the RESET instruction. On a warm
Reset, the device will continue to operate from the current clock source as indicated by the
Current Oscillator Selection (COSC<2:0>) bits in the Oscillator Control (OSCCON<14:12>)
register.
The device is kept in a Reset state until the system power supplies have stabilized at appropriate
levels and the oscillator clock is ready. The sequence in which this occurs is detailed below and
shown in Figure 8-2.
1.
2.
3.
4.
5.
6.
Table 8-1:
POR: A POR circuit holds the device in Reset when the power supply is turned On. The
POR circuit is active until VDD crosses the VPOR threshold and the delay TPOR has
elapsed.
BOR: The on-chip voltage regulator has a BOR circuit that keeps the device in Reset until
VDD crosses the VBOR threshold and the delay TBOR has elapsed. The delay TBOR
ensures the voltage regulator output becomes stable.
PWRT Timer: The programmable power-up timer continues to hold the processor in
Reset for a specific period of time (TPWRT) after a BOR. The delay TPWRT ensures that
the system power supplies have stabilized at the appropriate level for full-speed
operation. After the delay TPWRT has elapsed, the SYSRST becomes inactive, which in
turn enables the selected oscillator to start generating clock cycles.
Oscillator Delay: The total delay for the clock to be ready for various clock source
selections is given in Table 8-1. Refer to Section 7. “Oscillator” (DS70186) in the
“dsPIC33F Family Reference Manual” for more details.
When the oscillator clock is ready, the processor begins execution from location
0x000000. The user-assigned application programs a GOTO instruction at the reset
address, which redirects program execution to the appropriate start-up routine.
The Fail-Safe Clock Monitor (FSCM), if enabled, begins to monitor the system clock when
the system clock is ready and the delay TFSCM has elapsed.
Oscillator Delay
Oscillator Mode
Oscillator
Startup Delay
Oscillator Startup
Timer
PLL Lock Time
FRC, FRCDIV16,
TOSCD
—
FRCDIVN
FRCPLL
TOSCD
—
XT
TOSCD
TOST
HS
TOSCD
TOST
EC
—
—
TOST
XTPLL
TOSCD
HSPLL
TOSCD
TOST
ECPLL
—
—
SOSC
TOSCD
TOST
LPRC
TOSCD
—
Note 1: TOSCD = Oscillator Start-up Delay (1.1 μs max for FRC, 70 μs
times vary with crystal characteristics, load capacitance, etc.
—
Total Delay
TOSCD
TLOCK
TOSCD + TLOCK
—
TOSCD + TOST
—
TOSCD + TOST
—
—
TLOCK
TOSCD + TOST + TLOCK
TLOCK
TOSCD + TOST + TLOCK
TLOCK
TLOCK
—
TOSCD + TOST
—
TOSCD
max for LPRC). Crystal Oscillator start-up
2: TOST = Oscillator Start-up Timer Delay (1024 oscillator clock periods). For example, TOST = 102.4 μs for a
10 MHz crystal and TOST = 32 ms for a 32 kHz crystal.
3: TLOCK = PLL lock time (1.5 ms nominal), if the PLL is enabled.
DS70192C-page 8-6
© 2009 Microchip Technology Inc.
Section 8. Reset
Figure 8-2:
System Reset Timing
Vbor
VBOR
VPOR
VDD
TPOR
POR
BOR
1
TBOR
2
3
TPWRT
SYSRST
4
Oscillator Clock
TOSCD
TOST
TLOCK
6
TFSCM
FSCM
5
Reset
Device Status
Run
8
Time
POR: A POR circuit holds the device in Reset when the power supply is turned On. The POR circuit is active
until VDD crosses the VPOR threshold and the delay TPOR has elapsed.
2:
BOR: The on-chip voltage regulator has a BOR circuit that keeps the device in Reset until VDD crosses the
VBOR threshold and the delay TBOR has elapsed. The delay TBOR ensures the voltage regulator output
becomes stable.
3:
PWRT Timer: The programmable power-up timer continues to hold the processor in Reset for a specific
period of time (TPWRT) after a BOR. The delay TPWRT ensures that the system power supplies have stabilized
at the appropriate level for full-speed operation. After the delay TPWRT has elapsed, the SYSRST becomes
inactive, which in turn enables the selected oscillator to start generating clock cycles.
4:
Oscillator Delay: The total delay for the clock to be ready for various clock source selections is given in
Table 8-1. Refer to Section 7. “Oscillator” (DS70186) in the “dsPIC33F Family Reference Manual” for more
details.
5:
When the oscillator clock is ready, the processor begins execution from location 0x000000. The user-assigned
application programs a GOTO instruction at the reset address, which redirects program execution to the
appropriate start-up routine.
6:
The Fail-Safe Clock Monitor (FSCM), if enabled, begins to monitor the system clock when the system clock is
Note:
© 2009 Microchip Technology Inc.
When the device exits the Reset condition (begins normal operation), the device
operating parameters (voltage, frequency, temperature, etc.) must be within their
operating ranges, otherwise the device may not function correctly. The
user-assigned application must ensure that the delay between the time at which the
power is first applied and the time when the SYSRST becomes inactive is long
enough to get all operating parameters within specification.
DS70192C-page 8-7
Reset
Note 1:
dsPIC33F Family Reference Manual
8.3.1
Power-on Reset (POR)
A POR circuit ensures the device is reset from power-on. The POR circuit is active until VDD
crosses the VPOR threshold and the delay TPOR has elapsed. The delay TPOR ensures the
internal device bias circuits become stable.
The device supply voltage characteristics must meet the specified starting voltage and rise rate
requirements to generate the POR. Refer to the “Electrical Characteristics” section in the specific
device data sheet for more details. The POR status (POR) bit in the Reset Control (RCON<0>)
register is set to indicate the POR.
8.3.2
Brown-out Reset (BOR) and Power-up Timer (PWRT)
The on-chip regulator has a BOR circuit that resets the device when the VDD is too low
(VDD < VBOR) for proper device operation. The BOR circuit keeps the device in Reset until VDD
crosses the VBOR threshold and the delay TBOR has elapsed. The delay TBOR ensures the
voltage regulator output becomes stable.
The BOR status (BOR) bit in the Reset Control (RCON<1>) register is set to indicate the BOR.
The device will not run at full speed after a BOR, as the VDD must rise to acceptable levels for
full-speed operation. The PWRT provides a power-up timer delay (TPWRT) to ensure that the
system power supplies have stabilized at the appropriate levels for full-speed operation before
the SYSRST is released.
The power-up timer delay (TPWRT) is programmed by the POR Timer Value Select
(FPWRT<2:0>) bits in the POR Configuration (FPOR<2:0>) register, which provide eight settings
(from 0 ms to 128 ms). Refer to Section 25. “Device Configuration” (DS70194) in the
“dsPIC33F Family Reference Manual” for more details.
Figure 8-3 shows the typical brown-out scenarios. The reset delay (TBOR + TPWRT) is initiated
each time VDD rises above the VBOR trip point.
Figure 8-3:
Brown-out Scenarios
VDD
VBOR
TBOR + TPWRT
SYSRST
VDD
VBOR
TBOR + TPWRT
SYSRST
VDD dips before PWRT expires
VDD
VBOR
TBOR + TPWRT
SYSRST
DS70192C-page 8-8
© 2009 Microchip Technology Inc.
Section 8. Reset
8.3.3
External Reset (EXTR)
The EXTR is generated by driving the MCLR pin low. The MCLR pin is a Schmitt Trigger input
with an additional glitch filter. Reset pulses that are longer than the minimum pulse-width will
generate a Reset. Refer to the “Electrical Characteristics” section in the specific device data
sheet for minimum pulse-width specifications. The External Reset (MCLR) Pin (EXTR) bit in the
Reset Control (RCON) register is set to indicate the MCLR Reset.
8.3.3.1
EXTERNAL SUPERVISORY CIRCUIT
Many systems have external supervisory circuits that generate Reset signals to Reset multiple
devices in the system. This external Reset signal can be directly connected to the MCLR pin to
Reset the device when the rest of the system is Reset.
8.3.3.2
INTERNAL SUPERVISORY CIRCUIT
When using the internal power supervisory circuit to Reset the device, the external reset pin
(MCLR) should be tied directly or resistively to VDD. In this case, the MCLR pin will not be used
to generate a Reset. The external reset pin (MCLR) does not have an internal pull-up and must
not be left unconnected.
8.3.4
Software RESET Instruction (SWR)
Whenever the RESET instruction is executed, the device will assert SYSRST, placing the device
in a special Reset state. This Reset state will not re-initialize the clock. The clock source in effect
prior to the RESET instruction remains. SYSRST is released at the next instruction cycle, and the
reset vector fetch will commence.
The Software Reset (Instruction) Flag (SWR) bit in the Reset Control (RCON<6>) register is set
to indicate the Software Reset.
8.3.5
Watchdog Time-out Reset (WDTO)
The Watchdog Time-out Flag (WDTO) bit in the Reset Control (RCON<4>) register is set to
indicate the Watchdog Reset. Refer to Section 9. “Watchdog Timer and Power-Saving
Modes” (DS70196) in the “dsPIC33F Family Reference Manual” for more details on Watchdog
Reset.
Trap Conflict Reset
If a lower-priority hard trap occurs while a higher-priority trap is being processed, a hard trap
conflict Reset occurs. The hard traps include exceptions of priority level 13 through level 15,
inclusive. The address error (level 13) and oscillator error (level 14) traps fall into this category.
The Trap Reset Flag (TRAPR) bit in the Reset Control (RCON<15>) register is set to indicate the
Trap Conflict Reset. Refer to Section 6. “Interrupts” (DS70184) in the “dsPIC33F Family
Reference Manual” for more details on trap conflict Reset.
8.3.7
Configuration Mismatch Reset
To maintain the integrity of the peripheral pin select control registers, they are constantly
monitored with shadow registers in hardware. If an unexpected change occurs in any of the
registers (such as cell disturbances caused by ESD or other external events), a configuration
mismatch Reset occurs.
The Configuration Mismatch Flag (CM) bit in the Reset Control (RCON<9>) register is set to
indicate the configuration mismatch Reset. Refer to Section 30. “I/O Ports with
Peripheral Pin Select” (DS70190) in the “dsPIC33F Family Reference Manual” for more
details on the Configuration Mismatch Reset.
Note:
© 2009 Microchip Technology Inc.
The Configuration Mismatch feature and the associated Reset flag are not available
on all the devices. Refer to the specific device data sheet for more details.
DS70192C-page 8-9
Reset
Whenever a Watchdog Time-out occurs, the device will asynchronously assert SYSRST. The
clock source will remain unchanged. A WDT time-out during Sleep mode or Idle mode will
wake-up the processor, but will not reset the processor.
8.3.6
8
dsPIC33F Family Reference Manual
8.3.8
Illegal Condition Device Reset
An illegal condition device Reset occurs due to the following sources:
• Illegal Opcode Reset
• Uninitialized W Register Reset
• Security Reset
The Illegal Opcode or Uninitialized W Access Reset Flag (IOPUWR) bit in the Reset Control
(RCON<14>) register is set to indicate the illegal condition device Reset.
8.3.8.1
ILLEGAL OPCODE RESET
A device Reset is generated, if the device attempts to execute an illegal opcode value that is
fetched from program memory.
The illegal opcode Reset function can prevent the device from executing program memory
sections that are used to store constant data. To take advantage of the illegal opcode Reset, use
only the lower 16 bits of each program memory section to store the data values. The upper eight
bits should be programmed with 0x3F, which is an illegal opcode value.
8.3.8.2
UNINITIALIZED W REGISTER RESET
Any attempts to use the uninitialized W register as an address pointer will Reset the device. The
W register array (with the exception of W15) is cleared during all resets and is considered
uninitialized until written to.
8.3.8.3
SECURITY RESET
If a Program Flow Change (PFC) or Vector Flow Change (VFC) targets a restricted location in a
protected segment (Boot and Secure Segment), that operation will cause a security Reset.
The PFC occurs when the Program Counter (PC) is reloaded as a result of a Call, Jump,
Computed Jump, Return, Return from Subroutine, or other form of branch instruction. The VFC
occurs when the PC is reloaded with an Interrupt or Trap vector. Refer to
Section 23. “CodeGuard™ Security” (DS70199) in the “dsPIC33F Family Reference Manual”
for more details on Security Reset.
DS70192C-page 8-10
© 2009 Microchip Technology Inc.
Section 8. Reset
8.4
USING THE RCON STATUS BITS
The user-assigned application can read the Reset Control (RCON) register after any device
Reset to determine the cause of the reset.
Note:
The status bits in the RCON register should be cleared after they are read so that
the next RCON register value after a device Reset will be meaningful.
Table 8-2 provides a summary of the Reset flag bit operation.
Table 8-2:
Reset Flag Bit Operation
Flag Bit
Set by:
Cleared by:
TRAPR (RCON<15>)
Trap conflict event
POR, BOR
IOPWR (RCON<14>)
Illegal opcode or uninitialized
POR, BOR
W register access or Security Reset
CM (RCON<9>)
Configuration Mismatch
EXTR (RCON<7>)
MCLR Reset
POR
SWR (RCON<6>)
RESET instruction
POR, BOR
WDTO (RCON<4>)
WDT time-out
PWRSAV instruction,
CLRWDT instruction, POR,
BOR
POR, BOR
SLEEP (RCON<3>)
PWRSAV #SLEEP instruction
POR, BOR
IDLE (RCON<2>)
PWRSAV #IDLE instruction
POR, BOR
BOR (RCON<1>)
POR, BOR
—
POR (RCON<0>)
POR
—
Note:
8
All of the Reset flag bits can be set or cleared by the user software.
Reset
© 2009 Microchip Technology Inc.
DS70192C-page 8-11
dsPIC33F Family Reference Manual
8.5
DEVICE START-UP TIME LINES
Figure 8-4 shows the device start-up time line when a crystal oscillator is used as the system
clock. The power-up timer (PWRT) keeps the device in the Reset state for the user-assigned
application selected power-up timer delay (TPWRT) after a BOR to ensure that VDD rises to an
acceptable level.
The crystal oscillator is enabled after SYSRST is released. Once enabled, the crystal oscillator
takes a finite amount of time to start oscillating. This delay is denoted as TOSCD.
To ensure that a crystal oscillator (or ceramic resonator) has started and stabilized, a simple
10-bit counter counts 1024 oscillator clock cycles before releasing the oscillator clock. This time
period is denoted as TOST. For example, TOST is 102.4 μs for a 10 MHz crystal.
If the primary oscillator is used with the PLL, an additional delay is required for PLL locking. The
device begins to execute after the clock is ready.
The Fail-Safe Clock Monitor (FSCM), if enabled, begins to monitor the system clock for activity
when the system clock is ready and the delay TFSCM has elapsed.
Figure 8-4:
Device Start-up Timing for Crystal Oscillator
VBOR
VPOR
VDD
TPOR
POR
TBOR
BOR
TPWRT(4)
SYSRST
Clock
Ready
Oscillator Enabled
Oscillator Clock
TOSCD
TOST
TLOCK(3)
TFSCM
FSCM
FSCM(2)
Enabled
Device Status
Reset
Run
Time(1)
Note 1:
Delay times shown are not drawn to scale.
2:
FSCM, if enabled, monitors the system clock at the expiration of the TFSCM delay after the device starts
running.
3:
TLOCK is not inserted when the PLL is disabled.
4:
TPWRT is not inserted when the PWRT delay is not enabled.
DS70192C-page 8-12
© 2009 Microchip Technology Inc.
Section 8. Reset
Figure 8-5 shows the device start-up time line when the FRC oscillator is used as the system
clock. The FRC oscillator exhibits little start-up delay (TOSCD), so the oscillator start-up time
(TOST) is not required.
Figure 8-5:
Device Start-up Timing for FRC Oscillator
VBOR
VPOR
VDD
TPOR
POR
TBOR
BOR
TPWRT(4)
SYSRST
Oscillator
Enabled
Clock
Ready
8
Oscillator Clock
TOSCD(5)
TLOCK(3)
TFSCM
FSCM
Reset
Device Status
Reset
FSCM(2)
Enabled
Run
Time(1)
Note 1:
Delay times shown are not drawn to scale.
2:
FSCM, if enabled, monitors the system clock at the expiration of the TFSCM delay after the device starts
running.
3:
TLOCK is not inserted when the PLL is disabled.
4:
TPWRT is not inserted when the PWRT delay is not enabled.
5:
TOSCD for the FRC is 1.1 µs.
© 2009 Microchip Technology Inc.
DS70192C-page 8-13
dsPIC33F Family Reference Manual
8.6
SPECIAL FUNCTION REGISTER RESET STATES
Most of the special function registers (SFRs) associated with the dsPIC33F CPU and peripherals
are reset to a particular value at a device Reset. The SFRs are grouped by their peripheral or
CPU function and their Reset values are specified in the appropriate sections of this manual.
The Reset value for each SFR does not depend on the type of Reset, with the exception of two
registers. The Reset value for the Reset Control register, RCON, will depend on the type of
device Reset. The Reset value for the Oscillator Control register, OSCCON, will depend on the
type of Reset and the programmed values of the oscillator configuration bits in the FOSC Device
Configuration register.
DS70192C-page 8-14
© 2009 Microchip Technology Inc.
© 2009 Microchip Technology Inc.
8.7
REGISTER MAPS
Table 8-3 maps the bit functions for the RCON control register.
Table 8-3:
SFR
Name
RCON
Legend:
Reset Control Register Map
Bit 15
Bit 14
Bit 13
Bit 12
Bit 11
Bit 10
Bit 9
Bit 8
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
All
Resets
TRAPR
IOPUWR
—
—
—
—
CM
VREGS
EXTR
SWR
SWDTEN
WDTO
SLEEP
IDLE
BOR
POR
0003
— = unimplemented, read as ‘0’. Reset values are shown in hexadecimal.
Section 8. Reset
DS70192C-page 8-15
8
Reset
dsPIC33F Family Reference Manual
8.8
DESIGN TIPS
DS70192C-page 8-16
Question 1:
How do I use the RCON register?
Answer:
The initialization code after a device Reset should examine the RCON register
and confirm the source of the reset. In certain applications, this information can
be used to take appropriate action to correct the problem that caused the Reset
to occur. All Reset status bits in the RCON register should be cleared after
reading them to ensure the RCON value will provide meaningful results after the
next device Reset.
Question 2:
The BOR module does not have the programmable trip points that my
application needs. How can I work around this?
Answer:
The BOR circuitry is used to avoid violation of the V/F specification of the device.
In many devices, the minimum voltage for full-speed operation is much higher
than in dsPIC33F devices. Therefore, in such devices, a programmable BOR
circuit is needed to provide the multiple speed option. The dsPIC33F devices,
however, support full-speed operation at a much lower voltage, so the simple
BOR module is enough. If the device operating voltage drops to a value where
full-speed operation is not possible, then BOR is asserted. If the device is in a
non-BOR state, then full-speed operation is valid.
Question 3:
I initialized a W register with a 16-bit address, but the device appears to
reset when I attempt to use the register as an address.
Answer:
Because all data addresses are 16-bit values, the uninitialized W register logic
only recognizes that a register has been initialized correctly if it was subjected to
a word load. Two byte moves to a W register, even if successive, will not work,
resulting in a device Reset if the W register is used as an address pointer in an
operation.
© 2009 Microchip Technology Inc.
Section 8. Reset
8.9
RELATED APPLICATION NOTES
This section lists the application notes that are related to this section of the manual. These
application notes may not be written specifically for the dsPIC33F product family, but the
concepts are pertinent and could be used with modification and possible limitations. The current
application notes related to the Reset module include the following:
Title
Application Note #
Power-up Trouble Shooting
Power-up Considerations
Note:
AN607
AN522
Please visit the Microchip web site (www.microchip.com) for additional Application
Notes and code examples for the dsPIC33F family of devices.
8
Reset
© 2009 Microchip Technology Inc.
DS70192C-page 8-17
dsPIC33F Family Reference Manual
8.10
REVISION HISTORY
Revision A (February 2007)
This is the initial released revision of this document.
Revision B (February 2007)
Minor edits throughout the document.
Revision C (July 2009)
This revision includes the following updates:
• Sections:
- Added Control Registers as a new section (see 8.2 “Control Registers”).
- Added Register Maps as a new section (see 8.7 “Register Maps”).
• Tables:
- Removed Table 8-2: Reset Characteristics, in 8.3 “System Reset”.
- Added Table 8-3 in 8.7 “Register Maps”.
• Additional minor corrections such as language and formatting updates are incorporated
throughout the document.
DS70192C-page 8-18
© 2009 Microchip Technology Inc.