Commit Graph

8 Commits

Author SHA1 Message Date
true cf209fce4d possibly fix wasted power in idle mode
arduino uses TCA timer to do its things. it doesn't need to do anything
while the MCU is in low power sleep. disable TCA whenever entering sleep
from user code.

note that the prior "working" demo commented using the rgb_run_next sleep
loop in the program. was still diagnosing issues with TCB0 interrupt.
if there's still issues waking from idle with TCB interrupt, then things
will still need to be addressed...

this fix is untested.
2025-04-28 20:19:36 -07:00
Brooke 4d58a3df74 LEDs now operating on button push
Fixed several bugs:
- TCB wasn't running. The datasheet steps were not complete.
- TCA was waking the MCU and causing the main program to run. Added checks
  to ensure program only runs on button or TCB wakeup.
- Fixed some peculiarities with specific RGBLED programs
2025-04-28 21:07:46 -04:00
true 9827a8f6be don't run timers in stop mode while debugging 2025-04-27 21:37:56 -07:00
true 57f7b1b48d fix setting clock divider to /1 when it should be /2
misinterpreted docs. too much ARM in my life.
the system sets up the clock divider with /2 and expects it to stay there.
was setting the divider to /1 thinking it only affected peripherals.
adjusted timings to compensate for the new divider.
2025-04-27 21:36:50 -07:00
Brooke 8692b71fd8 Fix several bugs 2025-04-28 00:00:41 -04:00
true 8a0430f137 fix not sending last frame to LEDs
also, clarified comments a bit
2025-04-23 19:53:59 -07:00
true d8d2677f54 fix some mistakes 2025-04-23 09:58:29 -07:00
true 70b9fe0dd6 migrate code to AS7, including fucked up arduino import
arduino as a library will not build with -flto. I can't figure it out. so we
waste some space compared to what platformio was building. oh well. there's
still over 1K of space left for programs.
2025-04-23 01:42:39 -07:00