30.12.2013 Views

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

200 CHAPTER 4. T-KERNEL/OS FUNCTIONS<br />

TPW DOSUSPEND<br />

TPW DISLOWPOW<br />

TPW ENALOWPOW<br />

Suspended state<br />

Switching to low-power mode disabled<br />

Switching to low-power mode enabled (default)<br />

#define TPW_DOSUSPEND 1 Suspended state<br />

#define TPW_DISLOWPOW 2 Switching to low-power mode disabled<br />

#define TPW_ENALOWPOW 3 Switching to low-power mode enabled (default)<br />

• TPW DOSUSPEND<br />

Execution of all tasks and handlers is stopped, peripheral circuits (timers, interrupt controllers,<br />

etc.) are stopped, and the power is cut (suspended). (off pow is called.)<br />

When power is turned back on, peripheral circuits are restarted, execution of all tasks and handlers<br />

is resumed, operations resume from the point before power was cut, and the system call returns.<br />

If for some reason the resume processing fails, normal startup processing (for reset) is performed<br />

and the system boots fresh.<br />

• TPW DISLOWPOW<br />

Switching to low-power mode in the dispatcher is disabled. (low pow is not called.)<br />

• TPW ENALOWPOW<br />

Switching to low-power mode in the dispatcher is enabled. (low pow is called). The default at<br />

system startup is low-power mode enabled (TPW ENALOWPOW).<br />

Each time TPW DISLOWPOW is designated, the request count is taken. Low-power mode is enabled only<br />

when TPW ENALOWPOW is requested for as many times as TPW DISLOWPOW was requested. The maximum<br />

request count is implementation-dependent, but a count of at least 255 times must be possible.<br />

[Additional Notes]<br />

off pow and low pow are T-<strong>Kernel</strong>/SM functions. See 5.6 for details.<br />

T-<strong>Kernel</strong> does not detect power supply problems or other factors for suspending the system. Actual<br />

suspension requires suspend processing in each of the peripheral devices (device drivers). The system is<br />

suspended not by calling tk set pow directly but by use of the T-<strong>Kernel</strong>/SM suspend function.<br />

Copyright c○ 2002, 2003 by T-Engine Forum<br />

T-<strong>Kernel</strong> <strong>1.B0.02</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!