Symbian3/SDK/Source/GUID-768E599C-3EDA-5AC9-8D27-7C6240B0CC63.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-768E599C-3EDA-5AC9-8D27-7C6240B0CC63"><title>Serial Ports and Power Management</title><abstract><shortdesc>The power requirements of a standard serial port can be significant. This topic describes the issues that can result from this. </shortdesc> <p>The NS16550 UART, which is the standard component used for the serial ports on a PC, supplies a small 5.25V to the DTR and RTS modem control lines, which can draw up to 160mA each. The device is rated at 1W. Mobile device serial ports have to provide the same functionality, and can potentially draw a lot of power. </p> </abstract><prolog><metadata><keywords/></metadata></prolog><conbody><p>In order to conserve battery power the serial hardware is switched off until the port is actually used. To use a port a request is made to read from it or write to it. This means that even if the modem control lines have been explicitly set high (using <xref href="GUID-3B4E8ED5-72F7-3E51-B188-3C1045526DDF.dita#GUID-3B4E8ED5-72F7-3E51-B188-3C1045526DDF/GUID-29E8C7B9-29FD-3F5B-AAEE-33E64E2D6E24"><apiname>RComm::SetSignals()</apiname></xref>), neither RTS nor DTR have been asserted when the call completes. </p> <p>A situation could arise where deadlock occurs. A deadlock can be created when a remote device plugged in to a mobile device serial port is waiting for one of the remote device's input lines to go high before asserting the remote device's outputs, and an application on the mobile device is waiting for activity at the serial port before powering the port up. </p> <p>The way to avoid this deadlock occurring is for the application to power the port up by issuing a dummy read or write request for zero bytes as soon as the port has been opened. </p> </conbody></concept>