-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LILYGO T-Watch-S3 #9480
LILYGO T-Watch-S3 #9480
Conversation
Thanks! Just ordered one for myself. |
This doesn't work with SX1262
IMPORTANT! This board does some pretty weird AXP2101 with the RTC, and the docs are wrong. To get all the hw to work, the following configuration commands must be run after the pmic is loaded: pmic._aldo1_voltage_setpoint = 3300
pmic._bldo1_voltage_setpoint = 0
pmic._bldo2_voltage_setpoint = 3300
pmic._aldo1_voltage_setpoint = 3300
if pmic._read_register8(24) != 15:
pmic._write_register8(24, 15) # Charge VBackup at 3v3 If the coin cell battery is not charged for an extended period of time the RTC will not advance (it will set the time and not tick). Optionally, to configure the power button to behave a bit more normally: if pmic._read_register8(39) != 31:
pmic._write_register8(39, 31) # 2s on time, 10s off time I will provide the commands to init all the hardware once I have everything working. Technical detailsThey claim PCF8563 is powered through ALDO1, however in the schematic we can see the path exists, but is disconnected due to a NC.Instead the rtc takes it's power from VBackup. Configuring VBackup is not something the current library supports. Register `24` is `0x18` which is responsible for all the charging and efuel stuff. Value `15` is `0xF` and sets the bits as `0000 1111`, which is the correct charging voltages limits and stuff. At least that's what I think for now. I'll test some more stuff later. I did test with a multimeter and verified the coin cell is being charged. |
The PR is kinda ready, I'll update the branch and fix the merge conflicts in a moment. Hardware init guide: PMIC (AXP2101)import board
from axp2101 import AXP2101
pmic = AXP2101(board.I2C())
pmic._aldo1_voltage_setpoint = 3300
pmic._bldo1_voltage_setpoint = 0
pmic._bldo2_voltage_setpoint = 3300
if pmic._read_register8(24) != 15:
pmic._write_register8(24, 15) # Charge VBackup at 3v3
if pmic._read_register8(39) != 31:
pmic._write_register8(39, 31) # 2s on time, 10s off time Axis + temperature sensor (BMA423)import board
from bma423 import BMA423
bma = BMA423(board.I2C()) Speaker (MAX98357A)import board, audiobusio
audio = audiobusio.I2SOut(board.I2S_BCK, board.I2S_WS, board.I2S_DOUT) Vibrator (DRV2605)import board
import adafruit_drv2605
i2c = board.I2C()
drv = adafruit_drv2605.DRV2605(i2c) RTC (PCF8563)import board
from adafruit_pcf8563.pcf8563 import PCF8563
i2c = board.I2C()
rtc = PCF8563(i2c) Touchscreen (FocalTouch)from adafruit_focaltouch import Adafruit_FocalTouch
i2c = board.I2C()
ftouch = Adafruit_FocalTouch(i2c) IR LEDimport pulseio
import board
import adafruit_irremote
pulseout = pulseio.PulseOut(board.IR_LED, frequency=38000, duty_cycle=2**15)
encoder = adafruit_irremote.GenericTransmit(
...
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
A board (or I should better say, a normal looking watch) from LILYGO.
Got it from the official aliexpress store. Similar to
lilygo_twatch_2020_v3
.Note:
For supporting all of the hardware out of the box, a few frozen modules were added that are not by adafruit, or by me.
While I am actively testing them, these modules seem pretty final.
If adding frozen modules of 3rd parties without their knowledge is an issue, I am willing to fork & pledge to maintain them.
Task checklist:
There is also a SX1262, but there is currently no working driver, so not including for now.