2
\$\begingroup\$

I read about a flash emulator. Can someone tell me what exactly a flash emulator is, and explain how it works? Is it synonymous with an in-circuit emulator?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ From my experience, it seems to be just a term used by TI for programmer+debugger. It's not a usual in-circuit emulator where the actual chip is emulated, since it uses debug features of the target chip. \$\endgroup\$
    – AndrejaKo
    Commented Jul 1, 2013 at 9:02

1 Answer 1

3
\$\begingroup\$

A Flash Emulator is used in a system that normally keeps its program code in a FLASH memory chip.

The emulator is a small piece of hardware that substitutes in place of the normal FLASH memory chip in a way to disable the normal FLASH and stands in place of its functionality. Sometimes the normal FLASH chip is unplugged and the emulator plugs into the chip socket. Other times the target board will have a special connector to which the emulator attaches. The act of plugging in the emulator disables the normal FLASH and enables then emulator. A third common type is connecting the emulator via a chip clip that clamps over the FLASH chip on the target board.

If the emulator is to pretend to be the FLASH to the board under test it has to supply memory that can contains program code for the processor on the board. This memory is usually in the form of RAM inside the adapter that has glue hardware between it and the FLASH interface to convert the normal FLASH read/write interface protocol to that required to access this RAM. In this manner the processor on the target board can fetch and execute code that is contained in RAM of the emulator.

The RAM from the emulator is also dual ported to a host accessible interface so that the RAM contents can be loaded. The host is often a PC type computer with cross compiler, assembler and linker tools that is capable of producing program images for the target MCU. The host computer then accesses the Flash emulator so that the code can be executed and tested on the target MCU. The interface between the host computer and the emulator may be a variety of different types including parallel port, USB, serial, or Ethernet. USB interfaces are in common use today.

These days in the embedded MCU world the use of actual Flash Emulators as described is becoming quite uncommon. Almost all mainstream MCUs have onboard FLASH memory and built in debug harware that allows remotely loading the FLASH. The debug hardware is the used to permit testing of the code as it executes. The debug interface to the MCU is a specialized set of pins that connect to a special downloader/debug pod. The host computer is normally connected to this debug pod via USB or Ethernet and special dedicated software on the host is used to do the FLASH programming and operate the debug interface in the target MCU.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks for the explanations. It clears lots of doubts I was having. \$\endgroup\$
    – gpuguy
    Commented Jul 1, 2013 at 9:23
  • \$\begingroup\$ It may be worthwhile to note that flash emulators may differ in the level of "realism" they offer. Since some aspects of flash-chip behavior may arbitrarily vary with age, it's possible to design an emulator so that anything which has any realistic chance of working on a real chip would work on the emulator, or so that anything which has a realistic chance of failing on a real chip will fail on the emulator. Some emulators may provide a means of "tuning" the simulated behavior, but I haven't looked at the particulars of any readily-available emulators. \$\endgroup\$
    – supercat
    Commented Jul 1, 2013 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.