Skip to content

HyperLog News and Status

tz1 edited this page Sep 13, 2010 · 5 revisions

The latest fat32cli adds the # command (undocumented – not in the help) which will do a deep-erase of the SD card and then format it FAT32. This erase will make the writes work fast (at least until it fills up and the background erases become necessary again).

Also, the XOff and XOn will be sent for flow control for the cases where the buffer fills and it can’t be written to the SD card immediately.

I adjusted it to save power – it uses just over 2mA when idling.

There are some new updates to the fat32lib files – the SD/SDHC code wasn’t playing nice with older SD cards so I had to reinstall the slow SPI for startup (and switch to turbo after everything is initialized). Some other silliness removed and cleanup in other routines (rename is now setname so as not to conflict with the linux/posix call from stdio).

Earlier I was able to save 10Mb without a hiccup at 57600 baud with the current code.

It might not work 100% over 19200 though. Before the most recent commit, it would do 5 accesses when extending to a new cluster. Now it just does 2 (read, then write), except when the new cluster is in a different sector in the FAT, where it does 5, and though rare, if the SD card needs to do some deep erase cycle or whatever it is, it will pause longer than the 1k serial input buffer will hold. The longest run I’ve seen is 2k dropped once at 115200 baud with the older code, but normal reads and writes should not have taken so much time as to overrun.

Clone this wiki locally