-1

I wanted to know which is the chip that runs to detect when the power button is pressed to switch on the phone. Is the real time clock and circuit and this chip connected in any way?

ANIRUDH NJ
  • 19
  • 2
  • The button raises an interrupt that is captured by the hardware and acted on. How this is done is hardware specific to some extent, but you can research interrupts. –  Apr 09 '16 at 15:39
  • 1
    One thing is for sure, the main processor is switched on. It can be sleeping, but it has to be powered on. There are sleep modes where almost all the processor peripherals are switched off and power consumption is very low, but some parts of the processor core must be powered on all the time. – Claudio Avi Chami Apr 09 '16 at 15:44
  • @ClaudioAviChami what you say is not necessarily true, particularly for a Lithium powered device where the voltage provided by the battery, well above 2V worst case, would be too much for a processor that probably runs from 1V8 or less. – Vladimir Cravero Apr 09 '16 at 15:52
  • 2
    @VladimirCravero what are you talking about? The voltage for the core is always going through a power supply, wether the phone is sleeping or not. Some power supplies can be enabled or disabled, but why would they be bypassed, only because the phone is sleeping? With your logic, when the phone is ON the core would be burnt by the battery. You cannot sent an interrupt to a logic that is powered down. The PMU has to talk with SOMEBODY, and that somebody is inside the CPU core. – Claudio Avi Chami Apr 09 '16 at 15:55
  • @ClaudioAviChami what I am talking about is that the power supply is off, so no voltage is available to keep the reset circuitry from the CPU on. Moreover, even deep sleep might not be enough when the phone is off. The cpu is just not needed, so the power is cut – Vladimir Cravero Apr 09 '16 at 15:57
  • What kind of phone? Is this for a cell phone or a cordless phone or what? – Dwayne Reid Apr 09 '16 at 15:58

2 Answers2

6

This is a very broad question, a proper answer could be given only on a per-device basis, only by an expert engineer from the company that makes the device and probably only by someone that works on the specific product.

That said, the mechanism that allows the device to be turned on with a button and not a switch is actually pretty simple.

A mobile phone is a complex device that includes several different ASICs: the CPU, the GPU, the radio, RAM, flash, touch controller, a class D amplifier and so on.

Most of these devices usually have a control pin that puts them in standby mode: a very small portion of the chip is on, controlled by that pin, and keeps the rest off. In this way it is possible to achieve a very low current consumption when the chip is not needed. Think of when you switch to 'airplane mode': the radio is turned off and you save a lot of battery.

But this is not enough. Mobile phone vendors literally struggle to give you the maximum battery life you can get, and keeping all this chip in standby mode would not just cut it when the device is off: the user expects no drain when the device is off.

What comes into play then is the power management unit, or PMU. That's the chip that generates all the voltages necessary to all the other chips on the board. Custom made PMUs can switch off their outputs, lowering total power consumption even more. There usually are two PMUs on a mobile phone, one is the charger, which takes care of the battery, and then the 'real' PMU, that generates all the voltages. The PMU usually have some inputs for buttons, and one of them is usually the power button.

When the device is 'off' then, a small part of the PMU and the charger are still on, ready to power up everything. When you press the button the PMU powers up, tells the processor via a dedicated pin, and then the control passes to the CPU.

As for RTCs I am not sure mobile phones have it, time is usually synced via GSM or similar.

Vladimir Cravero
  • 16,395
  • 2
  • 39
  • 73
  • The RTC has to be running all the time, even when the microcontroller is sleeping, otherwise you wouldn't be able to set an alarm to wake up in the morning.. You are right in that the RTC is updated when the phone re-establishes a connection to a cell tower. – tcrosley Apr 09 '16 at 16:07
  • @tcrosley alarm does not work when most of modern smartphones are turned off, that's why I thought it is not included. I am quite sure ther's no dedicated chip for board space's sake, but it might well be inside an asic that performs other functions – Vladimir Cravero Apr 09 '16 at 16:49
  • 1
    I just did an experiment with my iPhone. First I put the phone into Airplane mode. Then I set an alarm for 10:00 am (a few minutes in the future), and turned the phone completely off by pressing the power button until it said "slide to power off". Then I waited several minutes and turned the phone back on. You are right, the alarm didn't trigger until the phone powered up again. But the clock was correct (10:02 am), meaning the RTC was running during that time. – tcrosley Apr 09 '16 at 17:05
  • My assumption would be: a separate circuit which works independent of the microprocessor, to turn on and turn off the power to the processor – seetharaman Apr 09 '16 at 17:34
  • Oops.. Posted the comment in the wrong place. – seetharaman Apr 09 '16 at 17:38
  • @tcrosley nowadays the 'turn on on alarm' is a feature that is advertised since it is very uncommon. a chip that can turn on the whole phone reading the RTC probably needs a nice voltage, which means a buck somewhere is on, which means you are wasting battery, for such low consumption buck efficiency is just awful. I believe the trend is embedding such a thing in the rtc itself, but it requires $$ and time since it's not something around right now. I think RTCs embed an LDO or something to be able to run directly from the 2..4.3V a LiIon battery gives. – Vladimir Cravero Apr 09 '16 at 17:46
2

Virtually all microcontrollers and microprocessors have a way to go to "sleep", in which case their main clock (which often runs in the hundreds of MHz in the case of cell phones) is turned off, and the current drawn is reduced to a few µA, if not nA (the current drain for any clocked CMOS device is proportional to the clock speed). The processor itself is not actually completely switched off.

Most micros can raise an interrupt when a port pin changes state even in deep sleep, since this doesn't require the main clock to be running. This what happens when you briefly press and release the power button on an iPhone, for example, and then press the home button later to wake it up. The processor is put to sleep, but peripherals are still enabled so you can receive calls, alarms can go off etc.

But if you are referring to the situation where power to the processor is completely removed, then a circuit like the one in shown in my answer here to another question can be used. In that case the circuit doesn't draw any power at all when the processor is powered down -- the main power supply can be powered down, and the circuit referred to runs directly off the battery -- but the button will still power up the processor when it is pressed.

This is what happens when you press the power button and keep it pressed until the iPhone says "slide to power off". When you power the phone back up, the processor is restarted, as evident by the Apple logo being displayed on the screen.

So in this case, it's not necessary to have any chips powered up for the power button to wake up the processor from a power-off condition.

If the processor is put to sleep (clock disabled), but not powered down, the RTC can be kept running off a separate 32 kHz clock, which consumes very little power compared to the main clock (this is the same type of crystal used in a digital watch, and those can keep running for years with just a tiny battery).

The RTC usually gets synced to the cell tower after the rest of the chip is back in normal mode. If the processor is completely shut down (no power), then the RTC function would have to be carried out using a separate chip, or the processor would need to have separate power rail dedicated to just this function.

This must be the case with the iPhone, as I did an experiment. First I put the iPhone into Airplane mode (so it couldn't update right away on power-up). Then I powered it completely down by pressing and holding the power button. I waited a bit and turned the iPhone back on. The RTC had the correct time, so that meant it was running while the processor was powered down.

tcrosley
  • 48,066
  • 5
  • 98
  • 162