A memory dump reads the existing contents of a device's internal memory and saves the data to a file on your PC.
Hardware Requirements
You will need a PEmicro Multilink or Cyclone programmer that supports your target device architecture. Please visit the following product pages to determine which hardware is compatible with your target device.
Cyclone: https://www.pemicro.com/cyclone
Multilink: https://www.pemicro.com/multilink
Software Requirements
You will need the appropriate PROG software for your target architecture.
Multilink users: A licensed version of the appropriate PROG software is required for your target device architecture.
Cyclone users: The appropriate PROG software is included with the Cyclone software package at no additional cost.
Memory dump is supported on all ARM Cortex-M devices. For legacy or non-ARM Cortex-M devices, support depends on whether a corresponding PROG application is available for that architecture. If no PROG software is available for your target architecture, memory dump is not supported. In these cases, the device can still be erased and programmed with an S-record file, but reading the existing contents of the device is not supported. The memory dump is saved in S-record format only.
For a complete list of available PROG software, please visit the PROG product page:
https://www.pemicro.com/products/product_viewDetails.cfm?product_id=15320181&productTab=5053
Important
The memory dump feature is not supported by the Cyclone Image Creation Utility. Memory dump data is streamed directly from the target device to the PC and saved as an S-record (.srec) file. The Cyclone does not store the dumped data in its internal memory, as it is not designed to hold memory dump images.
Steps:
1) Connect to your the target board with your PEmicro hardware interface making sure connection and power is good.
2) Use PROG software to select your hardware interface and set proper settings for communications. Debug shift frequency setting may need to be lowered for proper connection for devices with JTAG connection.
3) Once connected and there are no errors in entering debug, you will be prompted for an algorithm. Select the flash driver algorithm that fits your memory needs. Many devices may have different memory regions and may have different algorithms for each. Repeat all of these steps for each memory region. Later you could append each file to create one large file if you wish.
4) If the algorithm loads correctly, you should see many commands pop up for selection. Use Show Module command to view the memory contents if you wish. The command you want to use to memory dump into an srecord format file is "Upload Module". Call this command, specify the file name of your choosing, and the entire memory region covered by the flash driver will be dumped. You can optionally call Upload Range and pick the memory region you want dumped. The srecord file can now be used to copy and program to a different device.
Troubleshoot:
A) Cannot enter debug.
The connection may be bad. Please check power and signals through an oscilloscope and confirm everything is correct. Another reason why you may run into this issue is if the chip is secured permanently. In this case, you may be out of luck.
Some architectures may just need a password specified before you can connect. This is typical of NXP MPC56xx/57xx or ST SPC56xx/57xx/58xx devices.
Most other architectures that are secured will prompt you if you wish to mass erase to remove security. You will not be able to read the memory contents if you see this prompt. Your only option is to erase to be able to use the chip again, or exit the software.
B) Can enter debug but cannot load algorithm
Check for external watchdogs and system bus chips on the RESET line. Use an oscilloscope on RESET to see if there are interruptions during communication. Turn these hardware off manually. If the device uses JTAG, you should see the debug shift frequency setting in the connection assistant. Lower the frequency and try again.
C) Cannot program copied srecord file to another chip
This can happen if the chip's memory is not erased. Please make sure the region you wish to program is blank. Another reason is if the chip and memory does not match between the copied chip and chip you plan on programming. For example you are trying to program to a chip that has smaller memory or requires a different flash driver.
D) It copied and programmed fine, but application does not run correctly.
Make sure you copied all memory contents. Some applications may require EEPROM, DFLASH, OTP regions, external flash memories, etc to function properly. The only memory you do not need to worry about is RAM.
Another reason is the application is specifically built to work on that one chip. This is becoming more common to prevent anyone from copying their code. For example the application may be using the chip's unique ID to generate keys. In this case, you will need to have the correct key generated per chip.