PEmicro Blog

Choosing the Correct Programming Algorithm

Jan 06, 2009

When using PEmicro's PROG family of programming software, it's necessary to specify the correct programming algorithm to match your hardware setup. Because PEmicro provides thousands of different programming algorithms this can seem like a duanting task. In this article we discuss how to quickly determine the programming algorithm that correctly matches a specific hardware setup.

1) Obtain the latest Programming Algorithms

PEmicro's Programming Algorithms are being constantly updated to support new devices. For convenience, all of our algorithms are located here. These algorithms are grouped according to the processor family being used.

2) Internal, External Flash/EEPROM, or External SPI Flash?

Internal Flash/EEPROM is memory that resides inside the processor itself. Although most modern processors contain at least some internal Flash/EEPROM, there are some specific devices (Freescale MCF5474) that do not contain any nonvolatile storage. External Flash is a separate integrated circuit component that is externally connected to the chip select pins of the processor. External SPI Flash is also a separate component that is externally connected to the SPI pins of the processor. In general, external Flash and SPI Flash is used for higher end 32-bit applications that require increased memory capacity.

3a) Internal Flash/EEPROM Algorithm Selection

Once you have identified the processor that you are working with, it is generally straightforward to identify the correct programming algorithm. All of PEmicro's internal Flash/EEPROM algorithms contain the processor part number in the filename. In certain cases, there are separate algorithms for programming the Flash and the EEPROM. This information is also present in the algorithm filename itself. All the algorithms for the processors in the same architecture end in the same file extension. Some processors have proprietary part numbers but have the same memory map as a published part number. In these cases, the algorithm for the published part number can be used.

Examples:

9S08GB60.S8P - Freescale MC9S08GB60 internal Flash 

9S08SG4_PRESERVE.S8P - Freescale MC9S08SG4 internal Flash, preserve the factory trim values at 0xFFAE-0xFFAF 

Freescale_912D60A_All_Flash_and_EEPROM.12P - MC912D60A internal Flash and EEPROM 

Freescale_MC9S12DP256_1x16x128k_256k_Linear_16k_page.12P - MC9S12DP256 internal Flash

Freescale_MC9S12DP256_1x16x2k_4k_EEPROM.12P - MC9S12DP256 internal EEPROM 

Freescale_MC9S12A256_1x16x128k_256k_Linear_16k_page_PLL.12P - MC9S12DP256 internal Flash, enable PLL to increase bus frequency on the MCU for faster programming speeds 

Freescale_MPC5604B_1x32x128k.PCP - MPC5604B internal Flash 

Freescale_MC56F84543_1x16x32k_pflash.dsp - DSC 56F84543 internal p-flash

HD64F2110B.H8P - Renesas HD64F2110B Internal Flash 

3b) External Memory Mapped Flash Algorithm Selection

PEmicro's external Flash algorithms use the following naming convention:

Manufacturer_PartNumber_NumDevices x DataBusWidth x NumRows_Proc.FileExtension

Manufacturer = Manufacturer of the external Flash device
PartNumber = Manufacturer Part Number
NumDevices = Number of these external Flash devices used in parallel. Devices are typically used in parallel to support a wider data bus. As an example, imagine that an external Flash device only supports a 16-bit data bus. By using two of these devices in parallel, a 32-bit data bus can be supported.
DataBusWidth = The data bus width of EACH external Flash device. Certain devices support multiple data bus widths.
NumRows = The number of rows in each Flash device. Each row contains DataBusWidth bits. NumRows multiplied by DataBusWidth results in the total size of the Flash memory.
Proc = This means this algorithm has special commands for specific processors. For example, the commands might turn off internal watchdogs or setup chip select pins.
FileExtension = The file extension is unique for each processor family.

Examples:

ST_29W128FH_1x8x16meg.CFP - A single STMicroelectronics 29W128FH device, configured for 8-bit data bus. Total size = 8 bits (1 byte) x 16Meg = 16 MB
ST_29W128FH_1x16x8meg.CFP - A single STMicroelectronics 29W128FH device, configured for 16-bit data bus. Total size = 16 bits (2 bytes) x 8Meg = 16 MB
ST_29W128FH_1x16x8meg_532x.CFP - A single STMicroelectronics 29W128FH device, configured for 16-bit data bus with setup commands for ColdFire 532x processors.
ST_29W128FH_2x8x16meg.CFP - Two STMicroelectronics 29W128FH devices, each configured for 8-bit data bus. The result is a 16-bit wide data bus. Total size = 2 x 8 bits (1 byte) x 16Meg = 32 MB

3c) External SPI Flash Section

Currently we only support External SPI Flash for ARM and some PowerPC Qorrivva (56XX/57XX) devices. PEmicro's external SPI Flash algorithms use the following naming convention:

Manufacturer_PartNumber_DataBusWidth x NumRows_sw_spi.FileExtension

Manufacturer = Manufacturer of the SPI Flash device
PartNumber = Manufacturer Part Number
DataBusWidth = The data bus width of the SPI Flash device.
NumRows = The number of rows in each Flash device. Each row contains DataBusWidth bits. NumRows multiplied by DataBusWidth results in the total size of the Flash memory.
FileExtension = The file extension that identifies if the SPI flash algorithm is for ARM or PowerPC.

Examples:

Winbond_W25Q128B_8x16Meg_sw_spi_nxp.arp - A single Winbond W25Q128B device connected to SPI bus on a NXP ARM processor. Total size = 8 bits (1 byte) x 16Meg = 16 MB

More information about SPI algorithms for ARM is found in the SPI serial programming algorithms resource page. 

4) Device not supported?

This page can be used to request a specific Flash Programming algorithm if you do not find what you are looking for. Use this form if your device is not supported or if the existing algorithms do not match your setup correctly (e.g., if you are not using the default chip select). This service is provided by PEmicro free of charge.

Tags related to this Blog Post

Prog ACMP     ARM     NXP     Production Programming