MCUHWC:GetBatteryVoltage

From 3dbrew
Jump to navigation Jump to search

Request

Index Word Description
0 Header code [0x00040000]

Response

Index Word Description
0 Header code
1 Result code
2 u8 battery_voltage

Description

Returns a number which can be used to calculate the voltage using this formula: magic * (voltage / 256) where magic is a constant number which seems to range somewhere between 4.6 and 5.0. Based on calculations and battery behavior it seems like it's indeed 5.0.


When the charger is plugged into a fully charged old3DS unit, this value will be maximum 0xD1

Unplugging the charger will make the value go down to 0xCE

The voltage at 5% battery percentage just after the LEDs start flashing is 0xAF

Plugging in the charger at this point will make the voltage go up to 0xB9