Commit Graph

15 Commits

Author SHA1 Message Date
edisondeng
79d604a387 fix(sleep): pin P3.6 to a fixed rising-edge trigger before Power Down
RF_HandleEdgeInterrupt()'s software ping-pong toggle can leave P3IM0
parked in either edge direction while awake; Enter_Low_Power_Sleep()
never reset it, so sleep entry could randomly land on a direction that
misses the wake edge. Per the datasheet truth table (WO-04 2.9), only
edge modes support power-down wake, not level modes, so this forces a
known rising-edge state (matching RF_Init()'s own boot default) instead
of switching to level-triggered as originally requested. wo-05 updated
to record the deviation and rationale.
2026-07-31 18:14:22 +08:00
edisondeng
ec556fdd2a fix(boot): hold backlight off until first frame is drawn
SGM_CTRL was turned on at the very start of LCD_Init(), before the
ST7789V register sequence and first frame ran, showing garbage/blank
content briefly on every boot. GPIO_Init() now forces backlight off at
power-on, LCD_Init() no longer touches it, and main() only turns it on
right before entering the main loop (after HomeApp's first frame is
drawn). Wakeup_Restore()'s existing on-then-reinit sequence is
untouched since it sets the level itself before calling LCD_Init().
2026-07-31 18:09:39 +08:00
edisondeng
4a89aef71e fix(rf): true single-edge P3.6 trigger + pull-down, restore edge decode
Root cause found via datasheet: PxIM0/PxIM1 has no dual-edge mode, only
falling/rising/low-level/high-level. (IM1=1,IM0=1) was actually
high-level interrupt, refiring continuously for the whole high-pulse
duration (confirmed by scope: no real HF noise, and edge_count=0 when
P3.6 grounded). Fix: start in rising-edge mode, software-toggle to the
opposite edge on every trigger (ping-pong) to emulate true dual-edge
triggering, feeding exact edge direction into the incremental decode
state machine (no glitch filter needed). Also switch P3.6 idle bias
from pull-up to pull-down, since floating-high under the old high-level
mode caused the interrupt-storm boot issue; removed the now-conflicting
pull-up restore in Wakeup_Restore().
2026-07-31 16:39:06 +08:00
edisondeng
a7a2cc9465 暂存 2026-07-31 13:57:06 +08:00
48db6523fb debug: 增加 KEY_SOS 物理按键开机自检与运行期电平跳变串口调试打印 2026-07-29 10:04:00 +08:00
2f4dd2660d fix: 解锁恢复 SOS 物理按键电平读取逻辑,并添加 GPIO_Init 中对应 P2.6 的上拉配置 2026-07-29 09:57:36 +08:00
8367524eec fix: 完美复原低功耗停机休眠与外部唤醒控制寄存器,修复唤醒死机 2026-07-28 18:22:04 +08:00
d01121e3ae feat: 校准电池电压与ADC2充电检测,重构RGB为Bitbang翻转驱动,并修复RTC晶振起振问题 2026-07-28 18:08:40 +08:00
Antigravity IDE
47bcd252b2 修正1.14寸屏幕垂直偏置并添加自动清屏以清除开机噪声;修正新硬件射频收发引脚对调,低功耗唤醒中断重定向至P3.6中断16;添加一键串口收发诊断测试指令,并临时屏蔽SOS物理按键 2026-07-17 19:43:02 +08:00
Antigravity IDE
c0d1fe74f5 重构手环软件架构:实现动态挂载前后台 App 框架,解耦拆分源文件,并引入统一日志宏 xtell.h 2026-07-17 09:08:53 +08:00
Antigravity IDE
731115e09a docs: 为所有代码源文件添加详细中文注释,并在设计文档中纠正GPIO物理引脚映射表 2026-07-16 17:53:44 +08:00
Antigravity IDE
afd59d28ee Configure low-power sleep and wakeup sequences for RF alarm trigger without noise interruption 2026-07-15 17:26:50 +08:00
Antigravity IDE
7292fd0fcb Fix RF noise wake-up bug by sleeping with EA=0 and checking flags directly 2026-07-15 17:16:56 +08:00
Antigravity IDE
601e01e954 Implement low power RF wake-up and filter mechanism 2026-07-15 17:05:22 +08:00
Antigravity IDE
7ebe802410 Modularize main.c into rgb, event, database, ui, system, and app_manager modules 2026-07-15 16:14:30 +08:00