USER'S GUIDE

threshold, the Power On Reset cycle will be executed as before. As a result, no special processing is required in software to accommodate this case.

In the case that VCC dips without going below VLI, the PFW flag will be set and a Power Fail Warning interrupt will still occur when VCC drops below the VPFW thresh- old. The PFW flag will remain set until it is cleared by ei- ther a reset of the flag by the software or by a Power On

cycle. If it is cleared while VCC is still below the VPFW threshold, it will be immediately set again. If it is cleared

after VCC has risen back above the VPFW threshold,

then it will remain cleared until the next time VCC goes below VPFW.

As long as the PFW flag is set, an interrupt condition is defined if EPFW is set. If the software executes a ser- vice routine in response to a PFW interrupt and exits the service routine with the PFW flag still set, then the pro- cessor will be immediately interrupted again. In a typical application, however, the Power Fail Interrupt service routine would test the PFW flag in a conditional loop to determine if VCC has risen back above VPFW and would then return control to the main program in response to the event. See Figure 7±3 for details.

SECURE MICROCONTROLLER POWER MANAGEMENT Figure 7±3

RESET VECTOR

 

POR = 0?

NO

 

 

RUN NORMAL

YES

RESET ROUTINE

SET POR

 

 

NO

PFW = 1?

 

 

 

 

 

 

 

 

 

 

 

 

SET EPFW

YES

 

POWER±FAIL

 

 

 

INTERRUPT

 

 

 

 

 

LONG POWER±UP

 

 

 

SLEW RATE, KEEP

 

 

 

CHECKING

 

 

 

 

POWER ON

 

 

 

 

 

 

 

 

 

BOOT ROUTINE

 

 

 

 

 

POWER±FAIL WARNING

INTERRUPT VECTOR

POWER HAS FALLEN BELOW VPFW,

CLEAR PFW FLAG BY READING

(READ PCON)

SAVE CRITICAL DATA TO NVRAM; PREPARE FOR POWER FAILURE

NO

PFW = 1?

YES

VOLTAGE IS STILL BELOW

VPFW, NOT SAFE TO RUN

POWER HAS RETURNED, RESUME OPERATION

050396 63/173

64

Page 64
Image 64
Mitsubishi DS907x SIP, DS5000TK manual Secure Microcontroller Power Management ±3, Reset Vector