an instance of the SPI interface timing out was observed on boot.
It's rare, but it happens.
This wraps those early calls with a retry loop and then
fail to reboot in case something really goes wrong.
Assisted-by: qwen3.6:27b (local)
turns out you don't just flip everything all the time! when
you flip the board upside down, the camera also flips. so then
you end up with a flipped image which is super-confusing.
however, the overlay text needs to flip. so this adds the
cases to handle that.
a bit convoluted:
- RTC wakeup goes through the "always on" subsystem
- keyboard routes through "always on" because the system can wake
on keyboard press
- thus the keyboard mechanism is abused/re-used to pass wakeup
events throughout the system.
Other notes - a wakeup alarm sent within 2 seconds of the current
time will trigger an assert. It's not recommended to use the RTC
for very near-term wakeups because if you e.g. hit swap or have
something else going on that's very "busy" (like QR code scanning)
the system might not get to waking things up in time.
Some code can be written to handle this and set up a degenerate
wakeup, maybe, but for now, I am leaving it as an assert because
I want to remind myself that there is an edge case here.
by default the knob is not frobbable because frobbing the
knob can lead to potential griefing
more specifically the owc (one way counters) control some
security state. they are all designed to "fail on increment"
but just giving someone a button to increment random counters
gives a DoS vector. So unless you need to open the API it's
recommended to not have it activated.
the commited code works, but there's something weird going on
with the clock setting math that indicates i'm not understanding
exactly what's going on. Need to move on and solve other problems,
but this will be an outstanding issue.
occassionally the hardware block just goes unresponsive. the
'fix' is to reset it, and then re-initialize the interface.
I suspect this has to do with the UDMA silently dropping transactions
when there's too much contention on the bus.
- adds API for retrieving & setting the ephemeral key. This is
a key that is erased by a power-on reset, but is preserved between
deep-sleep sleep/wake cycles. It is intended for securing a lock
PIN, and can be up to 192 bits long.
- adds API for checking the warm boot flags, which are also stored
in the backup registers.
this allows the ADC to depend on core HAL services. It's structured
so that other 'misc' services would go into the "other" module,
just to keep the overhead of threads/services down a bit. Up until
this point all the other services mapped to existing/other
server names, like the RTC, susres, etc.