Closed BioBox closed 4 years ago
SimpleWatch was written when T-Watch was first established. At that time, I was also a newbie in lvgl, so I wrote it more redundantly. Regarding the AXP power supply channel, except that LDO3 is used on a common backplane, the remaining channels are not used. If you are using a standard backplane, then LDO3 will control the vibration motor power supply, and the rest can be set to off. I will add a description of the power channel in the README.
In the code you submitted, it seems that you are going to use RTC_IRQ for timed vibration, but you have not set an alarm.I think you should refer to the sample code.
It is a simple demonstration of how to use the alarm clock function.
I don't want it to vibrate at a specific time, but at specific time intervals. The clicked handler uses the timer function ttgo->rtc->setTimer(ttimes[ttimes_index], 0x00, false);
not the alarm.
Judging from the datasheet of the chip, you can also use the timer for RTC_INT.
From section 8.8 it says:
At the end of every countdown, the timer sets the timer flag TF. [...] The asserted TF can be used to generate an interrupt on pin INT.
So setTimer
should cause an RTC_IRQ too right?
Yes, it will also trigger RTC IRQ
Does the 2020 model use the standard backplane? It looks like the only ones that I need are LDO 2 & 3, so I can turn the rest of them off.
Thank you very much I'll let you know if it works.
In T-Watch 2020, LDO3 is the audio power domain, and the remaining power channels are not applicable
Out of all the examples given,
SimpleWatch
is the most complex. One segment of code that really caught my attention is the following:What exactly do each of these AXP registers power? If I'm not going to use a certain module from the watch, is there a way of finding out which AXP register to disable?
Secondly, I want to write a sketch so that the watch will vibrate every 2, 3, or 5 minutes that is cycled everytime you push the button.
The clicked handler wakes and updates the display, clears and resets the timer, and removes the interrupt request. I'd like to know that this code is correct and stable, because I've never done embedded systems before and I don't want to break the thing using bad software. There's also very little documentation so I had to look through a lot of the drivers and datasheets of the chips. I just want to make sure I know what I'm doing. Thanks.