Saturday, May 19, 2012

SDHC USB Bootloader and Logging Firmware work!

I have the old Logomatic 2.3 working with the new SDHC USB bootloader. At first, FAT32 was not enabled. because the mass storage part doesn't even need a filesystem driver, the host takes care of it. However, In order to find and install FW.SFE, the bootloader needs FAT32 however, so this version has it.

Also, the old Logomatic firmware has been updated the minimum amount to use SDHC and FAT32.

All of this works for me, and generates log files, but it sometimes takes a LONG time to mount over USB (sometimes a minute or more).

So now I have put my code where my mouth is.


  1. 2gb+ of coolness. sparkfun should pick this up and implement as the official source code.

  2. thank you St.Kwan for your work!
    I tried to upload you SDHC new bootloader but flashmagic always fails at verifying step (mismatch at 0x00000024)... any suggestions?

    Thanks Luca

  3. I have a logomatic v2 (the 10-10-10 batch) and am trying to get this code working, and striking out.

    Flash magic loads the USB Bootloader code happily, and the 32GB SDHC card mounts correctly under windows. the FW.SFE file disappears, but nothing gets written to the file by the logger.

    Also, I get strange errors in WinARM trying to compile your code (but SFE's vanilla code compiles just fine). I have reflashed the logomatic with the stock bootloader & firmware and it works fine.

    When loaded with either your SDHC Logomatic or the bootloader, I get both status leds ON, then a slow blink between between them, eventually cycling back to both on.

    When I try to compile the bootloader, I get this:
    When I try to compile the logging firmware, I get this:

    Any ideas?

  4. Update!

    Added this line to each fat.h:

    #define UINTPTR_MAX UINT32_MAX

    And the code compiles.

    I deleted the blinklock() after the fatinit in main.c and the blinking went away.


  5. Kwan, I'm trying to cobble together a system that can read GPS serial data and some digital inputs (using the analog inputs) with a SparkFun Logomatic V2.7 boards. The current SparkFun firmware can read and write to a SDHC card just fine. I want to use your firmware instead so I can read the serial data and the analog inputs together (plus it seems so much more refined!). I have not tried your bootloader (since the original bootloader works with SDHC just fine), but I have installed your firmware from above. The firmware updates fine, but once complete and I restart the Logomatic, I get the following blink code: Green&Red, Green, Red, Green, Red, Red, Red, Red, Red...repeat (Blinkcode 5 I think) I presume this means that the firmware is unable to write to the SDHC card. Any ideas what I'm doing wrong? Do I need to also update the bootloader or is the firmware only compatible with V2.3 and earlier boards. Regards, Colin