Not too sure about any of this, I would think the second you hit the power butto
ID: 3821510 • Letter: N
Question
Not too sure about any of this, I would think the second you hit the power button on your phone it would first check for working hardware like ram, storage, and cpu. Not too sure about the rest of the steps.
Document and list each step your phone takes:
From turning it on (what it does to get ready for you)
To Logging on to the phone
To Clicking on your favorite app (what you do, what the phone does)
To connecting through the internet (via tracert) to your favorite on-line activity
To Interacting with your favorite activity (what you are doing, what the phone is doing, what the application is doing)
To logging out and turning off.
Explanation / Answer
The phone never completely powers off. The power switch doesn't control the current directly it's connected to a CPU interrupt pin. When the phone is running and it senses the switch closed for some minimum time, like a couple of seconds, it electronically disconnects power from the external peripherals, usually by MOSFET switches, then stops its own clock and goes into "sleep" mode. CMOS circuits only draw current when they are switching, so turning off the clock puts it into a very low power mode where it only draws microamps of current.
If the power switch is closed while the CPU is sleeping, it wakes up, turns its clock back on and executes an interrupt routine. If it finds the power switch still on after a brief delay, it goes into a wake-up or reboot operation and brings up all the phone systems. If it finds it was woken by accident, by noise or some other interference, it turns the clock off again and goes back to sleep.
There are other things that can wake the CPU sometimes a real-time clock, for example, will wake the CPU momentarily every second. In this case it doesn't power up the whole phone, but just increments a register or a memory location and then goes back to sleep. So there is a certain amount of power consumption in the "off" state that will eventually drain the battery, but it can take months before the battery is so low that the phone won't start up on demand.
POWER OFF
Most phones have microcontrollers, similar to an Arduino. So imagine your phone power button to be a switch attached to said microcontroller.
Now there are two ways to detect a switch press on a microcontroller, namely active high or active low.
What this means is that the phone will detect a signal (button state) when there is a high signal going to the input or vice versa. Let's go with active high for this explanation. One end of your power button would be connected to a 3.3V signal coming from your phone's VCC and then going into your phone's microcontroller input. When the button is not pressed, this input pin gets nothing, as expected.
Now when you press the power button, the input pin gets a 3.3V input, the active high. On your software side, you have an interrupt subroutine, which does exactly what it sounds like. It interrupts whatever part of the code was running and reacts to whatever caused the interrupt to occur. In this case, the interrupt routine deals with whatever must happen when the power button is pressed, like showing a menu or whatever. Once you select the right option, the OS initiates the shutdown sequence on your phone.
POWER ON
To power on, once you press the button, there is an initial startup sequence, most likely in the "BIOS" which gets called. This then calls the bootloader and gets your OS up and running. Most likely, there is an interrupt handler that gets turned on once a "HIGH" signal flows to it. It must be understood that even though your phone is "off", the battery still produces some charge all the time to run your system clock and all that. The power button simply redirects this charge to the interrupt handler.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.