MP3 Trigger Hookup Guide V24
The MP3 Trigger has a resident bootloader that allows updating the firmware directly from the microSD card, alleviating the need for a hardware programmer. Because this bootloader is in located in protected sectors of the PSoC’s flash memory, it cannot overwrite itself. The bootloader can always be run on power up, thus making it possible to recover from a bad firmware load.
Using the Bootloader
To update the MP3 Trigger firmware, copy the new firmware hex file to a FAT16 or FAT32 formatted micro-SD card and rename the file to “MP3TRIGR.HEX”. It doesn't matter if it's the only file on the microSD card or not - the bootloader will find it as long as it has this exact filename. Insert the microSD card into the MP3 Trigger with the power off. Hold down the center nav switch while turning on the power. Wait for the status LED to go solid, then power cycle the MP3 Trigger to run the new firmware.
Bootloader Detailed Explanation
The bootloader is always entered whenever the board powers up. The first thing it does is look to see if the center nav switch is being held down. If not, it immediately vectors to the start of the firmware. Note that if you have previously loaded bad firmware, the board will simply halt or do whatever your bad code tells it to do – possibly with no activity other than the power LED. This is normal if there's no good firmware loaded.
If the center nav switch is being held on power up, the bootloader searches the microSD card directory for a file named "MP3TRIGR.HEX". If there's no card installed, or the file doesn't exist on the card, it will blink the status LED very rapidly forever. If it finds and is able to open the file, it begins to program the PSoC Flash with the contents of the firmware file. The status LED will illuminate for each hex record programmed. If it successfully programs the entire file, the status LED will turn solid upon completion. You can then power cycle the MP3 Trigger and you will be running the new firmware (don't hold the nav switch down again or you will simply re-enter the bootloader.
If there's a flash memory programming error (or you pull the microSD card out before it finishes, for example) the status LED will indicate a bad programming cycle by blinking briefly at about 1 Hz (This looks very different than the blinking for programming records). You need to cycle the power again holding the nav switch to re-enter the bootloader.
The key is that the bootloader cannot over-write any p art of itself, no matter what's in the firmware image file. The worst thing that can happen is you load bad firmware and the board won't run. But you can always hold the nav switch down on power up and get into the bootloader to load new firmware.