Exploring the Embedded Controller

I’m not sure what you mean.

  • There are three selections under Windows 11 > Settings > Power and battery

  • You can create your own setup in Control panel > Power options > Create a power plan > Change settings > Change advanced power settings > Processor power management > etc.

Maybe you can set a few plans and make links to them?

No, you can not. That’s my point. (I’m very familiar with all the dials you can turn for power settings - you might think I’m not a noob needing to be pointed to this panel!) This Framework laptop - and my build in particular it seems - seems to have some differences from even other Framework laptops. For example, the default hibernate timing was “20 minutes”. Nobody else had seen that - on a clean install with the Framework driver bundle.

Zero controls. (that “Network connectivity” one is something I even had to hack-in with a registry tweak - and I don’t think it has any effect anyway)

Mine’s a newer one, bought from the store and shipped in a week, no batch number. Has the Tempo audio chip and came to me with BIOS 3.07. For what it’s worth. :man_shrugging:

How strange that you can not where I can ??

Maybe you are thinking of soemthing different that I ?

Never mind I’m sure you have an idea of what you want and are doing.

All the best. :slight_smile:

1 Like

If you’re not aware, the tool I’m using to adjust CPU behavior is Throttlestop. It can do quite a lot (more than the built-in Windows settings could), and even though it has a lot fewer usable controls on Tiger Lake than it had on previous platforms, you can at least adjust power limits and Speed Shift EPP which might be able to get the behavior you want. If you haven’t already, I would consider taking a look at it to see if it helps you at all.



this is a custom hook, not built-in. sorry!


@DHowett, you seem to be accessing the EC console, which is pretty much exactly what I’m looking for right now.

Background: I’m investigating Laptop powers *on* after hibernate when unplugging/unpowering dock - #6 by Matthijs_Kooijman and want to verify whether the EC is responsible for powering on the machine. I found the ectool console command that allows reading the console, but the buffer is too small, so the startup overflows the buffer, so I can’t see what happened at poweron. If only I could access the console chan command to disable some of the debug channels, I should be able to see the log from actual startup moment.

I looked at the hardware UART, which has no connector soldered on and it is really tiny, if I would want to try that I should probably get the official connector that’s intended to go there (and even then I’m not sure I would manage to solder that tiny…).

I was wondering how you managed to access the console, and why it curiously seems to be running in a text editor, and then I found your code at Commits · DHowett/framework-ec · GitHub. Hah! You hijacked the keyboard driver in the EC to (when enabled with F12) insert keypresses into the console stream and emit output back into the keyboard, that’s superclever :slight_smile:

Doesn’t really help me, though, since if I am going to flash a custom EC firmware (which I’m a bit hesitant to do, lacking a way to unbrick things if I really mess up), I might as well hardcode disable some console output :slight_smile:

So, do you happen to know if there are any host commands (or other tricks) I could use to capture more output? I looked through the list of host commands, but nothing seemed appropriate…

Edit: I just found your ECTool.efi build and tried to see if that would maybe run early enough to capture the poweron output with its console command, but it’s still drowned in PORT80 log lines, unfortunately…


Thanks! :smiley:

Unfortunately, apart from changing the parameters and building it yourself I don’t see a way to quiet some of the more spammy logs. Nobody updates channel_mask outside of the chan command.

I was thinking that you may be able to use ectool’s i2cread/i2cpassthru to get at the cyp5525’s BOOT_MODE_REASON. It would require some digging and the definitions for what those boot reasons are. However, I don’t think it’ll help with the problem at hand – the cyp5525 is probably coming up because it received power, and that doesn’t explain why the rest of the board is powering on.



That’s great, I’ll definitely try this out!

Is there also a way to change the power or current to charge the battery. If it can be set to a very low level, you can keep the battery at the same charge state without switching charging on and off.

You can set the battery to 60% in the BIOS as an example

Thank you for the reply! I’m not sure if what I said was clear.

I mean when I charge the laptop, the charger thats included will charge with 60 Watts power. The question is, can I modify the power of my charger so its charging slower to reduce stress on my battery (e.g. less heat and less rapid expansion).

If i limit the charge at 60% as you mentioned, it will charge with 60W until 60% charge is reached. But if I use 20W to charge it takes more time to charge, but my battery stays cooler.

It will only charge with what the battery requests, it will not charge at 60W. The 60W is just the maximum that the adapter can sustain.

The main battery ‘requests’ charge via what is called a PD protocol if there is no communication for example due to being connected to a Type A USB 3 port on a computer resort to 5V at 0.9A i.e. 4.5W.

Bascially the power supply only offers it doesn’t force the battery to charge.

The charging is done by negotiating a voltage to charge the battery as the battery sees fit, monitored by the Charging chip.

If the battery is very low 14.6 it may see if the charger can supply 20V at 3A for a short while.

When the battery reaches say 60% the voltage may be 15.4V and the request will drop the voltage maybe to 9V at 3A

Of course the battery will get warm if you both fully exploit the CPU/GPU and cause a huge drain and have the computer plugged in and the battery charging ~ then the 60W may be almost essential.

Sure using a charger that cannot provide as much power will do as you say.

You cannot modify the adapter unless it has it on the box, it cannot be done from the laptop.

My battery is set at 78% via the bios and neither the adapter or the battery get warm.

I also have a 12V car type charger that can negotiate the PD protocol or the QC3 for my Fairphone it can supply 85W.

You may be overly concerned about the battery.

Another issue is that if you use say a 30W charger that can negotiate the PD protocol it may push the adapter to the limit and if it not a classy adapter may damage it and more.

To ensure a slow charge you will require a non PD compliant charger so the computer only uses 5V at a max of 3A

1 Like

The short answer to this seems to be “no”, at least not without modifying the EC firmware. The closest thing you can do is to use a lower-power USB PD adapter, but this does introduce the possibility of draining the battery while plugged in if the computer consumes too much power. I can say from my own experience that a 30 watt adapter is fine if you’re using the machine mostly at idle or low CPU, and a 45 watt adapter is fine if you’re maxing out a single CPU core.

But more generally, taking advantage of the charge capacity (SOC percentage) limit and doing fewer charge-discharge cycles will have a much more profound impact on battery longevity than limiting the rate of charge.

Amoun, I have no idea what you mean by a “classy adapter”, but it is perfectly safe to run the Framework laptop from a 30 watt adapter that is USB PD compliant.

Without USB-PD negotiation, you may not even get 3 amps. It’s dependent on both the cables and the configuration of the charger. Using a lower-power PD-compliant adapter is a better solution.

1 Like

I had a BaseUs 65W PD QC charger and it got hot when loaded with the Framework and some plastic melted, needless to say it didn’t work well after that

Maybe PD works a lot different to QC charging. I was using a dumb 5V 2.4A supply and that seemed to draw max using my Fairphone. The odity being that although there was not QC communication occasionally it would say ‘Charging rapidly’ ?? just occassionaly :slight_smile:

1 Like

Thank you both for the further explanations.

If I understand batteries correctly a draining can only happen if the Voltage of your adapter is smaller than the Voltage of the battery.

I found the topic where the power adapter was introduced: The Power Adapter

It says its a PPS adapter, and if I understood correctly the output current can be programmed. Does this mean someone can program it in a way to be like a 30W adapter?

Ok I agree that maybe in the end this will extend the battery life not very much. I just thought that when users discuss the battery, it might be worth to also look at further details around.

While technically a correct statement for batteries in general, this is not relevant for the Framework. There is a DC-DC converter between the USB-C ports of the computer and the battery, so the input voltage doesn’t have any direct consequence on whether or not the battery is charging.

The input power system of the laptop negotiates with the power adapter to determine what amount of power (wattage) it is allowed to draw. It will then self-restrict the amount of power it draw to stay under that limit. If the laptop begins using more power than the negotiated limit, it will take the excess power from the battery so that it does not exceed its input power limit.

It’s my understanding that the Framework does not make use of the PPS mode. But regardless, it would not need PPS mode to self-enforce a lower power draw than the negotiated maximum. It would, however, require a modification to the EC firmware.

Indeed, QC works differently from PD. A compliant PD sink will never draw more than the negotiated maximum power, and in the absence of a PD negotiation, it will fall back to standard USB power signalling. This could limit you all the way down to 100 mA, or 1 A if you follow the USB 2.0 charging-only spec for shorting D+ and D- together.

1 Like

Just to update.

The battery will take what current it can get when it’s really flat and will warm a bit even with 20W…

I have just discharged my battery as much as I could and am charging it to 100% to reset the parameters for battery monitoring and to ‘stretch’ the battery.

In the first half an hour the charger got warm but the battery seemed fine.

It has taken 2½ hours to get to 95% and the last 1% took 10 min or more, there is no heat coming from the laptop.

As the battery charges the input reduces and so does the heat produced.

A 55W battery could charge to 50% in an hour if there is 60W available, maybe you can check using a 20W charger to see how much charge a completely discharged battery cab get in 1h :slight_smile:

1 Like

Update: I thought I had posted this but can’t find it.
At 96% I turned the laptop on and the remaining 4% charged in 3 min, so I think as the laptop runs from the battery the battery voltage dropped and so a higher voltage was applied forcing a higher charge rate ???

One thing to be aware of is that the state of charge percentage is always just a best guess. Within the battery there is a battery management system (or BMS) that does a process called “coulomb counting” to track how much electrical charge has entered or left the battery. This measurement process is imperfect, so error can accumulate in the reported value. Additionally, the amount of energy a battery can store will change over time (mostly losing capacity as the battery ages), so what energy level corresponds to “100% charged” will change over time.

These two factors are why you will often see recommendations to do an occasional “battery calibration” process where you allow the battery to drain all the way to 0%, then fully recharge it to 100%. This gives the BMS an opportunity to calibrate the actual capacity of the battery and correct its estimates.

Absent a full calibration, there are known points where a partial calibration can occur. Many batteries will “snap” to 100% when the battery has been sitting at its maximum allowable charge voltage and the charge current drops below a certain threshold. The battery and charger are not doing anything different, it’s just an artifact of the SOC measurement system.

1 Like

Well I can see that as I thought I explained.

I tested a few times, with no load on the battery I was sustaining 17.314V with a trickle charge of 1% in 20 minutes at 96%

Then clearly once I switch on the battery voltage depletes implying the charge for the system isn’t coming from the charger, which makes sense as the chargers voltage has to be managed and before that happens the drain is from the battery hence lowering it’s voltage, which ups the input.

At this point there is no coulomb measurement just a voltage one so a higher voltage is applied and more current gets to the battery…

I’m not sure of this but cannot think of any alternative reasoning. I may well ask Framework about this.

Y’all might be better served by discussing this in a separate thread, since it’s diverged quite a bit from a discussion about the embedded controller. :slight_smile: