Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 26 of 40

2D JANUS PSK for C/C++ Reference Manual, pages 251 to 260

Pages 251 to 260 of 400

The original document is the PDF (793 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Intermec J2020, Intermec J2010 and Intermec J2050

Page 251

Advanced Programming

4

Advanced Power Management The reader power management subsystem provides Advanced Power Management (APM) compliant BIOS software functionality using the VLSI SCAMP II chip set. The specific components of power management are: • BIOS Power Management (PM) software with the APM software interface. • Intermec Power Management (IPM) software. • VLSI SCAMP chipset Power Management Unit (PMU) hardware (VL82C322). APM is a layered, cooperative environment that allows applications, operating systems, and the system BIOS to work together toward the goal of reducing power consumption. The standardized flow of information and control across the layers facilitates interface requirements. The primary purpose of an APM implementation is to provide increased productivity and greater system availability by extending the life of system batteries without degrading performance.

Power Management Software Layers Power management is provided by two software layers: • System BIOS interface • Application interface The system BIOS interface is analogous to the power management methods implemented on current generation laptop systems, where automatic system functions temporarily shut down hardware components in order to prolong battery life. The application interface improves power management by letting an application actively determine operational conditions and directly control hardware power consumption.

4-11

Page 252

2D JANUS PSK for C/C++ Reference Manual

System BIOS Interface The system BIOS is the lowest layer of power management software in the system. It is resident in the reader at all times. The system BIOS is capable of controlling power management functionality without any support from the operating system or application.

Application Interface APM provides a cooperative interface between the system BIOS and other system or application software that makes the other software a partner in the power management process. Once this cooperative interface is established, the system BIOS informs its partner of significant power-related events and relies on its partner to actively participate in the power management process. The application layer assists the power management function by providing information that only the application can easily ascertain. Applications are not required to support the power management function, but they can greatly increase its effectiveness. Under DOS in particular, the application is often in the best position to know when the reader is idle and awaiting input. Some of the system BIOS functions can be called regardless of whether or not the cooperative power management interface has been established between the BIOS and the caller. However, some functions, particularly those related to notification of power events, do not operate until the cooperative interface is established. POWER.EXE provides a default cooperative connection to improve JANUS reader performance.

4-12

Page 253

Advanced Programming

4

Figure 4-1 Power States

USER PERSPECTIVE: Unit On

1 Input Device Activity Start Count Gathering

2 Standby (slow CPU clock) 2 APM/IPM: Set Standby State

3

CTRL+ALT+DEL Warm Boot

System "Activity" Detected

System "Activity" Timeout

1 Ready

Auto Shut-off Timeout

APM: Set Power State to Suspend

Off Key

Main Battery Low Low

Resume Override Boot

Resume

Power Loss (Interlock)

Suspend Override Kill Power

Set Storage Mode Kill Power

BIOS Startup

RTC Alarm

82C322 Auto On Boot

On Key

On Key Boot

3 Suspend

HDW Auto Power Off Kill Power

4 Off Backup Battery Dead or Removed

Special Super User Key Sequence

On Key With Main Batt Low Low

Main Battery Replaced "First Time" Power Up

On Key With Main Batt Low Low

USER PERSPECTIVE: Unit Off Notes: 1 (Turn ASIC clock on In < 1/2 clock period)

Key

JPSK.005

State

2 (Includes IRQs and NMI. The 82C322 PMU has 13 power management interrupt sources.) 3 (82c322 hardware Activity monitor timeout.)

Event Activity Transition

4-13

Page 254

2D JANUS PSK for C/C++ Reference Manual

The APM Power States APM supports four distinct power states: Ready, Standby, Suspend, and Off. Their relationships are depicted in Figure 4-1. Three of these states (Ready, Standby, and Off) apply both to individual system components and to the system as a whole. The Suspend state is a special low power condition that applies to the system as a whole, but not to the individual components. Usually, your application only distinguishes between two apparent conditions: On and Off, where the indicator is the display. In the On condition, the display is active and the power management is in either the Ready or the Standby state. In the Off condition, the display is inactive, and power management is in either the Suspend or the Off state. The system and devices change power states either by explicit command or automatically (based on APM parameters and system activity). The power capabilities of devices differ, and some devices may not be capable of achieving all states. Additionally, some devices may have unique, built-in power management that is invisible to the system, and therefore outside the scope of the APM specification.

Ready In the Ready state, the system or device is fully powered up and available. The APM definition of Ready does not differentiate between active and idle conditions; it only indicates that the system or device is fully powered up. The reader enters the Ready state when a device raises a hardware interrupt or accesses any controlled device.

Standby Standby is an intermediate system-dependent state that provides some power conservation. The reader enters the Standby state when the CPU is idle and there is no device activity (such as when an application is waiting for input). All data and operational parameters are preserved when the machine is in the Standby state. The CPU is powered but the clock runs very slowly (this does not affect the DOS time and date or any BIOS functions: it only conserves power).

4-14

Page 255

Advanced Programming

4

Suspend The Suspend state is the lowest level of power consumption available that preserves operational data and parameters. The reader enters the Suspend state by either the system BIOS or the software above the BIOS. The system BIOS might place the system into the Suspend state without notification if it detects a situation that requires an immediate response (such as the battery entering a critically low power state). When the system is in the Suspend state, computation is not performed until normal activity is resumed. Power is removed from the CPU. Resumption of activity does not occur until signaled by an external event such as pressing the 1/0 key.

Off In the Off state, the unit is powered down and inactive. Data and operational parameters are not preserved (except for PC card drives that contain their own backup mechanisms and are preserved as long as they are intact). The reader enters the Off state when the operator selects storage mode (from the boot loader screen) or when all of the batteries are dead.

Power State Transitions Figure 4-1 earlier in this chapter illustrates the methods and events used to transition between the indicated power states. States above the dotted line appear as On to the application, with the unit fully operational. States below the dotted line appear as Off to the application (the display is blank and a delay occurs when the unit is reactivated by pressing the 1/0 switch). When the unit appears to be on, it might be in either the Ready or Standby state. In the Ready state, it is indeed on and fully powered. In the Standby state, the hardware is fully powered but the CPU clock is slowed, maintaining only memory refresh capability. To applications, the CPU clock appears to be stopped. The Standby state reduces battery current dramatically. An exit from Standby occurs during any system activity that might require attention from the application. That is, not on BIOS clock ticks and not at the beginning of count gathering for bar code reading, although the end of the read generates an interrupt to direct the application to process the label.

4-15

Page 256

2D JANUS PSK for C/C++ Reference Manual

When the unit appears to be Off, it is usually in the Suspend state. It is in the Off state only when both the main and backup batteries are dead or removed, or when placed into Storage mode from the bootstrap screen. Figure 4-1 lists the events that control transitions between Ready and the Suspend or Off states. In normal operation, the unit transitions from Suspend to Ready when the 1/0 key is pressed and transitions back to Suspend on either an activity timeout or when the 1/0 key is again pressed. While the reader is in the Suspend state, you can use the resume override key sequence to exit from Suspend and activate the boot screen. From the boot screen, you can select the following actions: • Resume as long as the system state remains valid • Reboot the reader, which transitions to On • Select storage mode, which transitions to Off • Use the other boot screen functions Similar to an application, the CPU is in a Ready or Standby state while in the boot screen.

Power State Cooperation APM provides an industry standard interface for cooperation among calling applications. The composite PM, BIOS, APM, and IPM provides two modes of operation: • Transparent mode, where the BIOS, PMU, and PM cooperate to detect idle conditions and change power states by their set of rules. • Nontransparent mode, where the currently operating application (client subsystem) cooperates in controlling the system power state and uses its knowledge of when it is waiting for activity. In this mode, the currently operating application can wait in a lower power state. Basic power management capability is always present in the reader BIOS-PMU interaction. The reader reduces CPU power when it observes no system activity for a period of time, such as when the reader is sitting at the DOS prompt or waiting for operator input.

4-16

Page 257

Advanced Programming

4

Basic power management uses the Standby and Auto-shutoff states. System activity is detected by monitoring for key press functions, display change activity, and all interrupts except the BIOS clock tick. In addition, the PMU hardware activity timeouts are set to change automatically to lower power states when there is no interrupt activity. The Reader Wedge uses an IPM interface to control power management. For example, with IRL programs (which have no explicit PM interface), the Reader Wedge services know when the IRL program is waiting for input and that it can wait in a lower power mode. The Intermec configuration manager (IC.EXE) provides setup parameters for this level of power management. Your application can explicitly control the power states by connecting to the APM interface with the interface connect function. This method provides the best use of the reader power since the application knows when it is idle and therefore can wait in a Standby or Suspend state depending upon response time requirements. Applications that use the reader services interface have equally good power management without having to be explicitly concerned with power management functionality. The APM interface provides for polling by the application client to include power management information from the lower BIOS level software. Finally, POWER.EXE (a Microsoft product) is an APM client that monitors system usage parameters to determine when an application is idle. POWER.EXE is a TSR program that provides better power management for off-the-shelf programs that have no APM knowledge. POWER.EXE also takes care of correcting the system date and time when the unit has been suspended overnight or longer. When the reader is shipped, POWER.EXE is installed and enabled. The APM interface can only support one connected client at a time, so POWER.EXE must be disabled if an application wants to use the APM interface. You can disable POWER.EXE by placing the following command line in the AUTOEXEC.BAT file (or by executing the command at the DOS prompt, prior to loading an application): POWER OFF Programs that replace POWER.EXE must implement date correction algorithms when the reader is to be left suspended overnight or longer.

4-17

Page 258

2D JANUS PSK for C/C++ Reference Manual

IPM Interface Functionality The IPM interface is used by reader services and system functions to control power management state changes. It is transparent to application and operator controls. Both the IPM and APM interface cooperate to prevent the CPU from leaving the Ready state (except for critical Suspend transitions as discussed below). The IPM interface provides Suspend and Resume functions for both normal and critical conditions: • Normal Suspend • Normal Resume • Critical Suspend • Critical Resume

Normal Suspend The reader enters a normal Suspend transition when the front panel 1/0 key is pressed or the duration of the current activity exceeds the timeout parameter. A normal Suspend only occurs when PM is enabled. Functions in process are completely restored following a normal Suspend.

Normal Resume The reader enters a normal Resume transition when the front panel 1/0 key is pressed. A normal Resume transition follows a normal Suspend transition. A normal Resume is not possible unless there has been a prior valid normal Suspend to save the system state. If the system state is not valid, a normal Resume forces a reboot. The operator can use the boot screen function to dump the system memory state (through the communications port) to a host prior to rebooting.

4-18

Page 259

Advanced Programming

4

Critical Suspend The reader enters a critical Suspend transition when the battery is removed, the main battery is low, or the front panel 1/0 key is pressed. The reader attempts to enter a normal Suspend transition before entering a critical Suspend transition. Several warning periods occur prior to entering a low main battery state. Initially, the battery icon flashes as the battery begins to reach end of charge. Next the system emits warning beeps. Automatic shutoff with fully saved states occurs at a somewhat lower charge level. Certain system events (such as transmitting data using RF or a laser scanner) can add enough load to a low battery charge to cause an immediate transition to the low battery cutoff critical Suspend state. A critical Suspend transition is always enabled. The application software must deal with the subsequent resume as effectively as possible. Functions in process might not be completely restored following a critical Suspend.

Critical Resume The reader enters a critical Resume transition when the front panel 1/0 key is pressed or the battery is replaced. A critical Resume transition follows a critical Suspend transition. A critical Resume is not possible unless there has been a prior valid critical Suspend to save the system state. If the system state is not valid, a critical Resume forces a reboot. The operator can use the boot screen function to dump the system memory state (through the communications port) to a host system prior to a reboot.

4-19

Page 260

2D JANUS PSK for C/C++ Reference Manual

APM Interface Functionality Programs that need to connect to and use the APM interface should observe the following suggested protocol: • Turn off POWER.EXE (at the DOS command line) prior to connecting with the APM interface. • Issue an APM installation check call. This call returns information on the current APM functionality (such as whether power management is currently enabled or disabled). • Issue an APM interface connect call. If the return from this call shows an already connected client (such as POWER.EXE mentioned above), the application should terminate. The APM interface only allows one connected client. • Issue an interface disconnect call, prior to exiting (for example, returning to the DOS prompt), so that another client can be connected. Note: For an example of APM interface protocol as discussed above, see the application listing FIFO.CPP in Appendix B, “Sample Interrupt Programs.” You must enable power management for the interface connect call to be successful, otherwise the CPU stays in the Ready state until the operator presses an 1/0 key to transition to the Suspend state. Certain system activities (such as file access to the PC card) temporarily disable PM to protect their integrity. Your application might have its own reasons to disable PM. You can use the enable/disable power management call to enable PM. When PM is enabled, your application can initiate a get PM event call, and either use the result to change states or ignore the PM event call, in which case the unit stays in the Ready state (unless reader services is active to prompt state changes). A get PM event returns a battery status value that your application can use. When your application is connected as an APM client, it is notified during get PM event calls when a system Suspend condition occurs. APM requires your client application to complete current processes, issue a set power state command, and enter the Suspend state (effectively turning the unit off) as soon as possible.

4-20