(Under construction) This page covers the steps to reprogram the MMC in the AMC13.

Software Prerequisites

  1. AVR/Atmel Studio (newer versions of MMC may require the use of Atmel Studio 6.1 or higher)
  2. PuTTY (Only necessary for step to erase EEProm and subsequent memory reset)

Preparation (Producing MMC Release hex file)

Before you can program the MMC, you will need access to MMC Release hex file (e.g. AMC13_v2p1_Release.hex). For newer versions of the MMC, you may need to obtain this by decompressing the AMC13 zip file (e.g. AMC13_v2.1.zip ) using the latest version of AVR (Atmel) Studio. Relevant documents available in AMC13RelatedDocuments. The steps below give an example of how to obtain AMC13_v2p1_Release.hex from AMC13_v2.1.zip using Atmel Studio. If you already have the desired Release hex file, continue onto the next section.

  1. (Add instructions decompressing w/ Atmel Studio 6.1)

Programming MMC into Flash

  1. Make sure you have the most recent firmware for the MMC, which can be found in the AMC13 Related Documents link on the main page (this link location susceptible to change). For the purpose of examples, for the remainder of this section, I will assume the use of AMC13_v2.1.zip and that you have access to the necessary release hex file (e.g. AMC13_v2p1_Release.hex). If you do not have the necessary hex files, please follow the instruction on how to produce one from the MMC zip file.
  2. Connect AVR device into USB port on computer and into MMC port on AMC13.
  3. Start the AVR Studio program (e.g. AVR Studio 5.1)
  4. Open the AVR Programming dialog box by going to Tools -> AVR Programming or by clicking the lightning bolt icon in the shortcut bar.
  5. In the dialog box, you will see drop down menu options for Tool, Device, and Interface. Select the correct options (most likely the default one e.g. Tool = JTAGICE3, Device = AT32UC3A1512, and Interface = JTAG. Then click Apply
  6. Some other menu and button should now become active. Under Device ID, click Read. If everything is set up and connected properly, the prompt at the bottom should read: Reading device ID ... OK.
  7. In the menus on the left, select Memories
  8. In the Memories tab, you should have options to program the flash.
  9. Select the Release hex file corresponding to the desire MMC version either through the drop down menu or by clicking the ... button to find the file on the machine.
  10. Once the correct Release hex file is selected, click the Program button. Typically this is done w/ the Erase Flash before programming and Verify Flash after programming options on.
  11. Once the Program Successful message appear, you are done with this portion. Typically, after programming the MMC, you will want to erase the EEP and perform a memory reset.

Erasing the EEProm and Memory Reset

After loading new MMC firmware onto a board, it is often a good idea to erase the EEProm and perform a memory reset. To do so you will need to connect to the board via PuTTy and perform these tasks using provided commands.
  1. Connect machine to microUSB (Console) port on AMC13.
  2. Before we can connect to the AMC13, we need to the identify the board on our machine. To do this, you will need to open your computer's Device Manager (or your computer's equivalent) and read the identifying code. Look under Ports -> USB Serial Ports and read the code next to the USB Serial Port that corresponds to your board (e.g. COM10).
  3. Connect to the board via PuTTy:
    • Start PuTTy
    • Choose Serial under Connection type
    • Enter the corresponding host name for the board (e.g. COM10)
    • Enter the corresponding speed (for the AMC13, this is typically 19200)
    • Click Open. This should open a new window with a command line.
  4. You can check to make sure the correct board is connected, by power cycling the board by handle reset. This should cause the command line to output message related to the power off or power on of the board.
    • A useful command to check the state of the board you may use to check the sensor readings is the command:
             sensread all
             
    • NOTE that there is currently a bug in the how the command line interprets new line keystroke, which sometimes causes the user to have to press Enter twice before a command can be registered.
  5. To erase the EEProm, use the command and answer yes to the prompt:
                 eeperase
                 
    • NOTE that if there new line bug which requires a double return is occurring, to answer the prompt, you will need to actually enter 'yes' before the prompt appears
             eeperase  <ENTER>
             yes       <ENTER>  
             <prompt>  <ENTER>
             
  6. To run a memory reset, the command:
                 mreset
                 

-- DavidZou - 29 May 2013

Edit | Attach | Watch | Print version | History: r14 | r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r8 - 20 Jun 2013 - DavidZou
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback