![SONiX TECHNOLOGY CO. SN8F22711B Скачать руководство пользователя страница 64](http://html1.mh-extra.com/html/sonix-technology-co/sn8f22711b/sn8f22711b_user-manual_1321532064.webp)
SN8F2270B Series
USB 2.0 Low-Speed 8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 64
Version 1.3
6.10 WAKEUP INTERRUPT OPERATION
When the I/O port 1 or I/O port 0 wakeup the MCU from the sleep mode, the WAKEIRQ will be set to “1” no matter the
WAKEIEN is enable or disable. If the WAKEIEN and the trigger event WAKEIRQ is set to be “1”. As the result, the
system will execute the interrupt vector. If the WAKEIEN = 0, the trigger event WAKEIRQ is still set to be “1”.
Moreover, the system won’t execute interrupt vector. Users need to be cautious with the operation under multi-interrupt
situation.
¾
Example: WAKE interrupt request setup.
B0BCLR
FWAKEIEN
; Disable WAKE interrupt service
B0BCLR
FWAKEIRQ
;
Clear
WAKE interrupt request flag
B0BSET
FWAKEIEN
; Enable WAKE interrupt service
…
; Pin WAKEUP initialize.
…
; Pin WAKEUP operation.
B0BSET
FGIE
; Enable GIE
Example: WAKE interrupt service routine.
ORG
8
; Interrupt vector
JMP
INT_SERVICE
INT_SERVICE:
PUSH
; Push routine to save ACC and PFLAG to buffers.
B0BTS1
FWAKEIRQ
; Check WAKEIRQ
JMP
EXIT_INT
; WAKEIRQ = 0, exit interrupt vector
B0BCLR FWAKEIRQ ;
Reset
WAKEIRQ
…
; WAKE interrupt service routine
…
EXIT_INT:
POP
; Pop routine to load ACC and PFLAG from buffers.
RETI
; Exit interrupt vector