-
Notifications
You must be signed in to change notification settings - Fork 3
Netronix MSP430 embedded controller
In older board designs, such as the Kobo Aura (N514/E606F0B), Netronix uses a MSP430 as an embedded controller (EC) which handles several features including basic power sequencing of the i.MX SoC. The MSP430 is connected via I²C and responds to address 0x43.
There are two register layouts. The new one is detected by the NEWMSP
macro,
which checks if the version number is 0xe916
. This file documents the old
layout.
Interrupts are signaled through a GPIO line in falling edge mode.
For a register read:
- write one byte, the register address
- read two bytes (treated as a big-endian u16 in the original driver)
For a register write:
- write one byte, the register address
- write two bytes, the register value (also a BE u16 in the original driver)
Even though the driver treats all register accesses as 16 bits wide, only the upper (first) byte is used in many cases.
When read as a big-endian u16, this register provides the version number of the
EC. A value of 0xe916
indicates the new register layout, which is not
described in this document.
The time is set by writing 8-bit values into the high bytes of the following registers:
Register | Description |
---|---|
0x10 | year, zero means 2000 |
0x11 | month, one-based |
0x12 | day of the month, one-based |
0x13 | hour, zero-based |
0x14 | minute, zero-based |
0x15 | second, zero-based |
Register | Type | Description |
---|---|---|
0x16 | u8 | hour |
0x17 | u8 | minute |
0x18 | u8 | set to 0x01 in msp430_auto_power |
Register | Type | Description |
---|---|---|
0x1b | u8 | alarm offset in seconds, high byte |
0x1c | u8 | alarm offset in seconds, low byte |
Register | High byte | Low byte |
---|---|---|
0x20 | year; zero means 2000 | month, one-based |
0x21 | day of the month, one-based | hour, zero-based |
0x23 | minute, zero-based | second, zero-based |
- 0xff: "Jospeh 100108 // start ADC"
This 16-bit register contains the battery voltage, in the range 0-1023.
TODO: provide conversion formula
This 16-bit register contains different bits that indicate which interrupts have occurred. It can be read and written.
Bit value | description |
---|---|
0x0001 | Battery is critically low |
0x0002 | only used in dead code |
0x0008 | On board E606F0B (Kobo Aura), this bit indicates that the battery is charging (or discharging?) |
0x8000 | Alarm triggered |
- Write the 8-bit value 0x08 to keep the board powered one, or 0x00 to not keep it powered on.
- On E60632, 0x10 is written to this register, in
msp_poweroff
.
- Write the 8-bit value 0xff to reset the board.
Register | Type | Description |
---|---|---|
0xa1 | u8 | set to 0xff when disabling auto-poweroff |
0xa2 | u8 | set to 0xff when disabling auto-poweroff |
0xa3 | u8 | 0x01: enable PWM, 0x00: disable PWM |
0xa4 | u8 | cycle time (8MHz/frequency), low byte |
0xa5 | u8 | cycle time (8MHz/frequency), high byte |
0xa6 | u8 | duty cycle, low byte |
0xa7 | u8 | duty cycle, high byte |