Datasheet
ļ£ 2011-2012 Microchip Technology Inc. DS75018C-page 135
dsPIC33FJ06GS001/101A/102A/202A and dsPIC33FJ09GS302
8.6 Fail-Safe Clock Monitor (FSCM)
The Fail-Safe Clock Monitor (FSCM) allows the device
to continue to operate, even in the event of an oscillator
failure. The FSCM function is enabled by programming.
If the FSCM function is enabled, the LPRC internal
oscillator runs at all times (except during Sleep mode)
and is not subject to control by the Watchdog Timer.
In the event of an oscillator failure, the FSCM
generates a clock failure trap event and switches the
system clock over to the FRC oscillator. Then, the
application program can either attempt to restart the
oscillator or execute a controlled shutdown. The trap
can be treated as a warm Reset by simply loading the
Reset address into the oscillator fail trap vector.
If the PLL multiplier is used to scale the system clock,
the internal FRC is also multiplied by the same factor
on clock failure. Essentially, the device switches to
FRC with PLL on a clock failure.
8.7 Pseudo-Random Generator
The pseudo-random generator is implemented with a
15-bit Linear Feedback Shift Register (LFSR), which is
a shift register with a few exclusive OR gates. The shift
register is clocked by the PWM clock and is a read-only
register. The purpose of this feature is to provide the
ability to randomly change the period or the active
portion of the PWM.
A firmware routine can be used to read ānā random bits
from the LFSR register and combine them, by either
summing or performing another logical operation with
the PWM period of the Duty Cycle registers. The result
will be a PWM signal whose nominal period (or duty
cycle) is the desired one, but whose effective value
changes randomly. This capability will help in reducing
the EMI/EMC emissions by spreading the power over a
wider frequency range.
Figure 8-3 provides a block diagram of the LFSR.
FIGURE 8-3: LFSR BLOCK DIAGRAM
All Zero Detect
15
D
Q0
CLK
Q
D
Q1
CLK
Q
D
Q2
CLK
Q
D
Q3
CLK
Q
D
Q4
CLK
Q
D
Q5
CLK
Q
D
Q6
CLK
Q
D
Q7
CLK
Q
D
Q8
CLK
Q
D
Q9
CLK
Q
D
Q10
CLK
Q
D
Q11
CLK
Q
D
Q12
CLK
Q
D
Q13
CLK
Q
D
Q14
CLK
Q
LFSR