Repository navigation
Commit deaa3af
committed
fix(rtc): enable the alarm output, open-drain active low on PC13
setAlarmOutput() applied the new output settings by calling HAL_RTC_Init()
again, but HAL_RTC_Init() skips all configuration once the calendar is
initialized, which setTime()/setDate() always do first, so the alarm output
was never enabled. Write the OSEL/POL (CR) and output type/remap (OR) bits
directly.
PC13 is also the WAKE UP button (to GND, 100k pull-up, JP2 closed as
shipped), so drive it open-drain, active low instead of push-pull high: a
WAKE UP press during an alarm pulse can then no longer short a driven-high
pin to GND. The example's LED now goes from 3V3 to PC13.1 parent 1ef3e50 commit deaa3af
2 files changed
Lines changed: 15 additions & 8 deletions
File tree
- examples/Inkplate6Motion/Advanced/RTC/Inkplate_6_Motion_RTC_Alarm_Output
- src/stm32System
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
529 | | - | |
530 | | - | |
531 | | - | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
532 | 533 | | |
533 | 534 | | |
534 | 535 | | |
| |||
537 | 538 | | |
538 | 539 | | |
539 | 540 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
544 | 549 | | |
545 | 550 | | |
546 | 551 | | |
| |||
0 commit comments