LILYGO T-Watch-S3#9480
Merged
Merged
Conversation
This was referenced Aug 4, 2024
Member
|
Thanks! Just ordered one for myself. |
This doesn't work with SX1262
Author
|
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 3v3If 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 timeI 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. |
Author
|
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 timeAxis + 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(
...
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.