
APPENDIX
S3C9654/C9658/P9658
19-8
SUSPEND / RESUME SUPPORTING.
Application:
KS86P/C6104, KS86P/C6504, KS86P/C6408.
Purpose:
Supporting USB suspend SPEC.
Implementation: USB module have a 3 ms counter for this purpose. This counter cleared when USB traffic
happen (Including Keep Alive signal) . So this is a idle counter. If there is no USB traffic
during 3 ms then generate a suspend interrupt. If MCU receive this interrupt then do a
suspend sequence.
Samsung USB controller have three mode, these are normal, idle, stop. In suspend mode
Samsung MCU usually using stop mode, In stop mode the oscillator is down, so there is no
clock. Samsung MCU use D+, D- signal as a clock source when suspend mode. So Samsung
can detect resume signal without clock and generate a resume interrupt. When MCU receive
interrupt signal in stop mode, then the oscillator wake up and go interrupt service routine.
Usage1:
When receive resume signal from upstream port.
initialization routine;
ld usbint, #0ffh; Enable interrupt.
int
nop; Here is interrupt service routine label.
check interrupt vector; Assume this interrupt is suspend.
jp suspend;
suspend
nop;
do suspend routine;
stop; This means stop oscillator for saving power
; The whole chip action stop.
This stop can be recovered from external interrupt (external resume, keystroke, mouse moving, etc.) source.
That means if MCU receive interrupt then the oscillator automatically activating and jump to interrupt service
routine. In resume case, D- line connected to the clock port of resume detect F/F, so any change from idle mode
(idle to reset, idle to K-state) can be detected by this circuit. If this F/F detected action then generate a interrupt
to MCU part and going to interrupt routine.
int
nop; If the MCU receive resume or external interrupt then the PC
; get this address.
check interrupt vector; Assume this interrupt is resume.
jp resume ; Jump to resume interrupt service routine.
resume nop;
do wakeup process;
jp main; Jump to main loop;