skip navigational linksPJRC
Shopping Cart Download Website
Home Products Teensy Blog Forum
You are here: MP3 Player Detailed Info Upgrade Instructions

PJRC Store
Main Board, $150
LCD & Pushbuttons, $42
LCD/Backlight/PB, $77
IDE Cable, $9
Complete Parts List
MP3 Player
Main Page
Detailed Info
User Photo Gallery
Connecting The Board
Firmware Download
Side Projects
Technical Docs
Freq. Asked Questions
FAQ #2
News And Updates

Firmare Upgrade Using Hyperterminal

To upgrade the firmware, these are the basic steps:
  1. Establish Serial Communication, 19200 baud, 8N1, no flow control, using a standard 9 pin serial cable.
  2. Get to the "PAULMON2_MP3" prompt, either press "S" to abort automatic startup, or type "QUIT" while the MP3 player application is running.
  3. Erase the Flash ROM. Press "Z", and yes, you're sure!
  4. Send the mp3playerXX.hex file to the board, look for "No errors detected" after file transfer.
  5. Reboot the board.

Establish Serial Communication

You will need to connect the MP3 player to your comptuer's serial port. A standard "straight through" cable should be used. Do not use a null-modem cable. You can plug the player into your serial port "live". It's not necessary to turn off the computer or player. Usually you could start the terminal emulation program, then turn on the board, so that you'd see its start-up message, as shown below.

You will need to use a terminal emulation program to communicate with the MP3 player. Nearly any standard terminal emulation program may be used. Hyperterminal, which comes standard with Microsoft Windows will work (but many versions of Hyperterminal are slow, so you might want to try Tera Term if you have a slow Hyperterminal). Linux users may install "seyon" for X11, or use "minicom". The serial communication parameters must be set for 19200 baud, 8 bits, no parity, 1 stop bit, and no flow control.

Here are some screenshots showing how to set up Hyperterminal, which is included with Microsoft Windows. Usually Hyperterminal is located in the Programs / Accessories group. When running it for the first time, it may ask you if you want to install a modem. Even though is says you need to install a modem, you in fact do not need to do this, so just press "No", and cancel any additional setup dialog boxes until you just have the main Hyperterminal window showing.

The first step is to bring up the properties window. This can be done by clicking the properties button in the toolbar (as shown), or by selecting "Properties" from the "File" menu.

Hyperterminal, Step 1: Click on Properties Button

The next step is to select your serial port, in the "Connect using:" field, as shown. Then click the "Configure" button to set up the serial port parameters.

Hyperterminal, Step 2: Choose your serial port, and then press Configure

The last step is to set Hyperterminal's setting to match the settings required by the MP3 player board. Use 19200 baud, 8 bits, no parity, 1 stop bit, and no flow control. It is important to select "None". Using "Hardware" or "Xon / Xoff" are likely to cause problems, if they work at all.

Hyperterminal, Step 3: Adjust settings for the MP3 Player, 19200 baud, 8 bits, no parity, 1 stop bit, NO FLOW control

When the board is turned on, it will transmit a welcome message, shown in the next step.

Get To The "PAULMON2_MP3" Prompt

When the player boots up, it will send this welcome message.

Welcome to PAULMON2 v2.1 (MP3 Player Version)                                   
by Paul Stoffregen

http://www.pjrc.com/tech/mp3/

Press 'S' to abort auto start



Program Name                     Location      Type
  Memory Editor (VT100)            1000      External command
  MP3 Player                       2000      External command
  Auto-Start                       2F00      Start Up Code
  Quit, Shut Off Power             FE00      External command

PAULMON2_MP3 Loc:02000 > 

In this example, the S key was pressed as soon as the message appeared, and the MP3 player application was not automatically run. There is only 1/2 second available to press "S", so you'll need to be quick to abort automatic startup.

In most cases, it's not necessary to be quick with the S key, you can just let the MP3 player application start up and type QUIT while it's running. The instant you press the T it should stop, put the disk drive into sleep mode, and return you to the PAULMON2_MP3 prompt. Here's an example where QUIT was typed while the player was running:

Welcome to PAULMON2 v2.1 (MP3 Player Version)
by Paul Stoffregen

http://www.pjrc.com/tech/mp3/

Press 'S' to abort auto start



Program Name                     Location      Type
  Memory Editor (VT100)            1000      External command
  MP3 Player                       2000      External command
  Auto-Start                       2F00      Start Up Code
  Quit, Shut Off Power             FE00      External command




MP3 Player, Version 0.1, Sept 5, 2000
Copyright (C) 2000, PJRC.COM, LLC

Type 'QUIT' to return to the monitor

Configuring Xilinx XCS10XL FPGA Chip: Ok
Reseting IDE Devices
Configuring STA013 MP3 Decoder Chip: Ok
Waiting for Hard Drive to be ready
.
Reading Master Boot Record
Found FAT32 Partition at LBA = 0000003F
Reading FAT32 Volume ID
Volume ID looks ok
Sectors used for FAT tables: 00004C70
Reserved Sectors: 0020
First Data Sector at LBA = 00004CCF
Sectors per cluster: 20
Root directory starts at cluster # 00000002

MP3 Player, Begin Playback
Playing file: 000_BI~1.MP3   Attrib=20   First_Cluster=00000003   File_Size=005D
F706

08
PAULMON2_MP3 Loc:02000 > 

Erase the Flash ROM

Once you're at the prompt, erasing the flash memory is simple. Just press Z, and press Y when asked if you're sure you want to erase the memory. Erasure usually takes about 2 seconds. If your board has a flash enable jumper (only early Rev A boards), the jumper must be installed to allow erasing and writing to the flash memory.

PAULMON2_MP3 Loc:02000 > Erase flash rom                                        

Erase flash rom, Are you sure?

Flash rom erased

PAULMON2_MP3 Loc:02000 > 

Rev A: If you are unable to erase the flash, check the "FLASH EN" jumper located just below the 74HC165 chip. This jumper must be shorted to enable changes to the flash rom. There is no jumper on Rev B and Rev C boards, so they are always enabled for writing.

Send The New Firmware HEX File

Now you're ready to program the new firmware into the player. The downloadable firmware image is encoded in a file format called Intel-Hex. It's an ASCII-only format, with a checksum on each line. If an error occurs in the transmission or in programming the flash memory, you'll get a notice about it at the end of the download.

Just begin sending the file to the serial port, using the terminal emulation software to transmit the contents of the file. This is not a file transfer protocol (such as xmodem). You must send the file directly without any protocol. The board can receive at the maximum possible data rate, so it is not necessary to add delay (often called pacing).

To transmit the file in Hyperterminal, use "Send Text File..." from the "Transfer" menu.

Hyperterminal menu

At the beginning of the download, PAULMON2 will print a carrot ^ to indicate that the download has begun, and a dot as it receives each new line of data.

PAULMON2_MP3 Loc:02000 > ^......................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
........
Download completed

Summary:
 1102  lines received
 19464  bytes received
 19464  bytes written
No errors detected

The download process takes approximately 2 minutes for firmware revision 0.6.10. Some terminal emulators have options to add additional delays while tranmitting text, which are unnecessary and only serve to make the download much slower. If your terminal emulation software updates its window during the transfer (Hyperterminal does) you'll see a steady stream of dots as the data is sent. At the end, you'll see a summary from the board. Make sure it says "No errors detected". If there were errors, try erasing the flash rom and downloading again.

Reboot

Once you've sucessfully downloaded the firmware, all you need to do is reboot the player to run the new code. You can also cause the equivilant of a reboot by pressing J and then typing four zeros 0000, as shown here:

PAULMON2_MP3 Loc:02000 > Jump to memory location

Jump to memory location (2000), or ESC to quit: 0000                            

Tera Term - A Better Windows-Based Terminal Emulator

Tera Term Pro is a free Windows-based terminal emulator with much better performance than Hyperterminal. If your firmware download takes more than 2-3 minutes using Hyperterminal, you should upgrade to Tera Term (or upgrade to Linux!).

Michael J. Pounders provided this Tera Term script to automate the firmware upgrade.

Fast Flash Download

Rev C MP3 player boards made after May 11, 2002 include a Fast Flash Download that can download the entire firmware image in just 7 to 10 seconds! Using this new download is somewhat more complex than the slower intel-hex described on this page, so we suggest you try the fast download only after you have done the original intel-hex download successfully.


MP3 Player, Firmware Upgrade Instructions, Paul Stoffregen.
Hyperterminal screen shots contribued by Kasper Bonne.
http://www.pjrc.com/tech/mp3/upgrade.html
Last updated: February 23, 2005
Questions, Comments?? <paul@pjrc.com>