5.6 Power Management Functions

Power management functions are called from T-Kernel/OS. See tk_set_pow.

The manner of calling these functions is implementation-dependent. Simple system calls are possible, as is the use of a trap. Use of an extended SVC or other means that makes use of OS functions is not possible, however. Providing these functions in T-Monitor is another option.

The specifications given here for low pow and off pow are reference specifications. Since these functions are used only inside T-Kernel, other specifications may be devised as well. It is even possible to design completely di.erent specifications in order to realize more advanced power-saving features. If the functionality is similar to that specified here, however, it would be best to follow these specifications as closely as practical.

  • void low_pow( void )

Switches to low-power mode and waits for an interrupt to be raised. This function is called from the task dispatcher, and performs the following processing.

(A) Goes to low-power mode.

(B) Waits for an external interrupt to be raised.

© When an external interrupt is raised, restores normal power mode and returns to its caller.

This function is called in interrupts disabled state. Interrupts must not be enabled. The speed of response to an interrupt a.ects processing speed, and should be as fast as possible.

  • void off_pow( void )

Suspends the system. When a resume factor occurs, it resumes system operation.

This function is called from tk_set_pow, and performs the following processing.

(A) Puts the hardware in suspended state.

(B) Waits for a resume factor to occur.

© When a resume factor occurs, returns from suspended state and returns to its caller.

This function is called in interrupts disabled state. Interrupts must not be enabled. The device drivers perform the suspending and resuming of peripherals and other devices.

Comments