I got the directory display working.
https://github.com/aljex/SD2TPDD/tree/bkw_al32u4

So now it sleeps at about 2ma when idle, the light next to the card reader
blinks during card access, and the spot in the top-right corner of TS-DOS
shows the current directory, or "SD:   " in the root dir, and a lot of
stuff is all configurable from #defines at the top.

It's got about 86 seconds of solid thorough testing so it's totally
bulletproof. ;)

The 32u4 board seems to lose a little bit of the serial traffic when waking
from sleep. It doesn't seem to bother TS-DOS, but is apparent with other
stuff like TpddTool and Ultimate ROM 2. For UR2, the glitch is more or less
harmless. I have a sleep idle timer so, once woken, it won't sleep again
until idle for N milliseconds. You can set it to whatever you want. 5 or 10
minutes would be fine considering the full normal idle current draw is only
about 13ma. But I have it set at only 5 seconds which seems to be working
fine. So in UR2, you hit enter on the TS-DOS menu entry, and it will give a
disk error. But that woke up the board, and you just press enter two more
times (clear the error message, try to load again), and it loads fine this
time. Then once TS-DOS is loaded, it seems to work fine even when the board
goes to sleep. If you use TS-DOS from rom, that just works every time right
from the start.

You can avoid even the possibility of data loss on waking, by just changing
one of the #defines to either disable sleeping altogether, or change the
sleep mode from SLEEP_MODE_PWR_DOWN to SLEEP_MODE_IDLE.

Teensy doesn't seem to lose anything even with 0 sleep inhibit timer, and
using full power down sleep mode

There's another Adafruit board with the same form factor and major features
like the card reader and built-in battery charger,
but with a more powerful cpu and more ram. I have one but haven't tried
this on it yet.
https://learn.adafruit.com/adafruit-feather-m0-adalogger/overview

-- 
bkw

Reply via email to