I2C Registers: Difference between revisions

No edit summary
MarcusD (talk | contribs)
Update info about battery middle pin and temperature reading
 
(2 intermediate revisions by 2 users not shown)
Line 316: Line 316:
| s
| s
| ro
| ro
| Battery temperature (in Celcius?)
| Internal battery temperature (in Celsius)
|-
|-
| 0x0B
| 0x0B
| s
| s
| ro
| ro
| Battery percentage
| Battery percentage (integer part).
 
Valid values are in range of 0 to 100 inclusive.
|-
|-
| 0x0C
| 0x0C
| s
| s
| ro
| ro
| Battery percentage, fractional part (seems to have a resolution of around 0.1% according to tests)
| Battery percentage (fractional part).
 
Seems to have a resolution of around 0.1% according to tests.
 
To calculate battery charge percentage in full resolution:
MCU[0x0B] + (MCU[0x0C] / 256.0F)
|-
|-
| 0x0D
| 0x0D
| s
| s
| ro
| ro
| System voltage
| System voltage.
 
This voltage seems to be measured at the load side, so the voltage reading will always be lower than direct probes across the battery due to the various voltage drops in the system by the time the voltage is measured.
 
To calculate system voltage in Volts:
MCU[0x0D] * 5 / 256.0F
|-
|-
| 0x0E
| 0x0E
Line 725: Line 737:
   byte 0x00: Console type, see [[Configuration_Memory#MCU_HW_INFO|here]]
   byte 0x00: Console type, see [[Configuration_Memory#MCU_HW_INFO|here]]
   byte 0x01: PMIC vendor code
   byte 0x01: PMIC vendor code
   byte 0x02: Battery vendor code
   byte 0x02: Battery vendor code (determined from battery middle pin)
    0x00: Maxell (middle pin tied to GND)
      CTR-003 CTR-A-BP (old3DS)
      CTR-003 CTR-A-BPMX-C3 (2DS): Wuxi Hitachi Maxell Co.,Ltd.
      CTR-003 CTR-A-BPMX-C5 (Switch Pro Controller): Wuxi Maxell Co., Ltd.
      SPR-003 SPR-A-BPMX-C3 (new3DSXL): Wuxi Hitachi Maxell Co.,Ltd.
   byte 0x03: MGIC version (major?)
   byte 0x03: MGIC version (major?)
   byte 0x04: MGIC version (minor?)
   byte 0x04: MGIC version (minor?)
   byte 0x05: RCOMP(?)
   byte 0x05: RCOMP(?)
   byte 0x06: battery related? (seems to decrease while charging and increase while discharging)
   byte 0x06: On-board battery slot NTC reading (more heat causes this value to go *down*, and cooling off will make this value go back up)
   byte 0x09: system model (see [[Cfg:GetSystemModel#System_Model_Values|Cfg:GetSystemModel]] for values)
   byte 0x09: system model (see [[Cfg:GetSystemModel#System_Model_Values|Cfg:GetSystemModel]] for values)
   byte 0x0A: Red Power LED mode (0 = off, 1 = on)
   byte 0x0A: Red Power LED mode (0 = off, 1 = on)
Line 737: Line 754:
   byte 0x0F: RGB LED blue intensity
   byte 0x0F: RGB LED blue intensity
   byte 0x11: WiFi LED brightness
   byte 0x11: WiFi LED brightness
   byte 0x12: always 0?
   byte 0x12: raw button states?
    bit0: unset while Power button is held
    bit1: unset while HOME button is held
    bit2: unset while WiFi slider is held
    bit5: unset while the charging LED is active
    bit6: unset while charger is plugged in


On MCU_FIRM major version 1 the size of this is 9, reading past the 9th byte will yield AA instead of FF.
On MCU_FIRM major version 1 the size of this is 9, reading past the 9th byte will yield AA instead of FF.