SchmalzHaus logoDocumentation UBW32 HID Bootloader
Version 1.5 (11/22/2011)
Back to main UBW32 page

The bootloader is a small application that is programmed into your UBW32. There is a special 12K of Flash space reserved in the PIC32 for bootloader applications (although our bootloader doesn't actually reside there). The bootloader application runs whenever the UBW32 is reset, and decides if it should go into 'bootload' mode or 'run firmware' mode. The HIDBootLoader.exe application allows you to program your UBW32 using just your computer and a USB cable - no hardware programmer is required. This allows you to easily write new firmware or change the stock firmware and add your own commands.

Version Notes:
Bootloader Operation:
You can use your UBW32 in one of two ways - with bootloader or without. This page only describes using it with the bootloader, as that is how it is shipped from SparkFun.

When your UBW32 resets, it starts running the bootloader code. This bootloader code checks for any of these three conditions:
If any one of these three things is true, it will turn on all five LEDs and alternate flashing the white and green ones, then jump into bootloader mode. If none of them are true, then it jumps to the beginning of the normal firmware, and starts executing it as if nothing happened.

In bootloader mode, the HID Bootloader will activate the USB port on the UBW32 and will enumerate with your computer as a generic HID device. (Which means no drivers will ever be needed on the PC side.) It then waits for commands from the computer. Once you have your UBW32 in bootloader mode, you run the HIDBootLoader.exe program on your PC (which is contained in the zip file below), and then you can send a new HEX file down to the UBW32 and have the bootloader program that HEX file into flash. Once you're done programming, you can either reset the UBW32 manually (pressing and releasing the RESET button) or click the Reset Device button in HIDBootloader.exe and the UBW32 will then reboot and run the new firmware you just programmed.

Version 1.5 Files:
    ZIP file of all project and source files necessary to build 1.5 here.
    PIC32MX460 v1.5 HEX here (for programming a blank UBW32 - old style)
    PIC32MX795 v1.5 HEX here (for programming a blank UBW32 - new style)
    Browse the v1.5 build files here
    HIDBootloader application v2.90a (also contained in the zip file above)

Questions? E-mail me at my e-mail address

Creative Commons License
UBW32 USB Bit Whacker by Brian Schmalz is licensed under a Creative Commons Attribution 3.0 United States License.
Based on a work at
Permissions beyond the scope of this license may be available at