NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on The site is now set to read only.

Customizing DA830 GEL files

From Texas Instruments Wiki
Jump to: navigation, search


This page describes steps involved in customizing DA830 GEL files for custom hardware. This includes calculating PLL / EMIF and PINMUX setting for custom hardware setup.

Software Requirements

This page refers to some tools that require:

  • Microsoft Excel 2003 (or compatible) with Analysis ToolPak installed.
  • Microsoft .NET Framework version 2.0 (or compatible).

Required Packages

  • GEL file customization package.
    • This package contains base set of ARM/DSP GEL files along with Microsoft Excel based tool to calculate PLL/EMIF register settings.
    • Download from here.
  • Pin Setup utility.
    • This package installs a Pin Setup utility that can be used to calculate PINMUX settings for DA830 devices.
    • Download from here.


Getting ready

  1. Install Pin Setup utility if not already done.
  2. Unpack the GEL file customization package and open dskda830_dsp.gel file in a text editor.
  3. Open CalcTool.xls and make sure that Analysis ToolPak is installed.
    • Look at Tools → Add-Ins... menu.


  1. Open PLL Calculator sheet in CalcTool and enter crystal / oscillator details as used on custom board.
  2. Update various multipliers & dividers to get desired frequencies for CPU, EMIFA, EMIFB and EMAC.
    • Only the cells with white background are editable, others are locked.
    • As you update various values, notice updates in results box (with yellow background).
  3. Search for first occurance of Start of customizable code text in GEL file.
    • This should be located under Setup_PLL() function.
  4. Replace the text in customizable code area and with the text from result box in CalcTool.
  5. Save the GEL file and CalcTool.

This finishes PLL customization part of GEL file.


  1. Start Pin Setup utility from Windows Start menu.
    • Start → Programs → Texas Instruments → Pin Setup DA830
  2. Select appropriate device used in custom board.
  3. Select desired pins inidividually or by selecting pre-defined configurations / peripherals.
    • Recommended method for selecting pins is to use Edit → Find... menu with Search Only option to mark all pins for a peripheral and then then manually selecting individual pins, leaving unwanted pins un-selected.
  4. After selecting all desired pins, save pin selection for future reference using File → Save → Pin Selections menu.
  5. Now, click third button in the tool bar, which says Copy Registeres to Clipboard. This will copy PINMUX settings to clipboard in a format that can be used in GEL file as well as a C source file.
  6. Search for second occurance of Start of customizable code text in the GEL file.
    • This should be located under Setup_System_Config() function.
  7. Replace the text in customizable code area and with the one copied to clipboard in above step.
    • CalcTool doesn't support calculation for CFGCHIP2 yet. Please refer to datasheet to set this register correctly.
  8. Save the GEL file.

This finishes PINMUX customization part of GEL file.


The EMIF Calculator sheet in CalcTool helps calculate EMIF register values required for SDRAM connected to EMIFB peripheral and NOR/NAND flash connected to EMIFA peripheral. This tool does not yet support SDRAM connected to EMIFA peripheral.

EMIF calculation is fairly straight forward, much similar to PLL calculation:

  1. Enter correct operating frequency of EMIFA/EMIFB.
    • A red warning text will apear on right if the frequency doesn't match with the one calculated in PLL Caculator sheet.
  2. Enter various parameters / values from SDRAM / Flash datasheets.
  3. Values of EMIF registers will be automatically calculated and updated in the results boxes (with yellow background).
  4. Look for any errors indicated in results box.
    • If an error is flagged against any register field, it indicates that the value calculated for that field is out of range (overflow).
    • You may tweak one or more parameters of SDRAM/Flash device to get the value back in range.
  5. If no errors are indicated, copy text from results boxes to appropriate locations marked under Setup_EMIFA() and Setup_EMIFB() functions in the GEL file.

This finishes EMIF customization part of GEL file.

ARM GEL file

ARM GEL file only does memory maps, so it can be used as it is, without any customization.


  1. After GEL files are customized, save them to appropriate folder along with the CalcTool.xls and the .pin file saved from Pin Setup utility for future reference / modifications.
    • It is recommended to take regular back up of these files.
  2. Update target configuration in CCS to use the customized GEL files instead of the default ones installed with CCS.
    • CCSv4 by default, uses GEL files from C:\Program Files\Texas Instruments\ccsv4\emulation\boards\dskda830\gel folder.