PEmicro’s product line of Cyclone stand-alone
provides a fast, robust, and automated solution for production-scale
programming of microprocessors. However, production facilities may
even higher level of automation than the single-button touch capability
offered by the Cyclone. PEmicro offers several means of automating
control, including a command-line executable, UDP/Serial
communications, or the .DLL included in PEmicro's new Cyclone Automated
Control Software Package. In this article, we discuss automated control
using the automated control package and the unprecedented level of
power and flexibility that
1.) Introduction – Controlling a Cyclone through the PC
PEmicro’s new Cyclone Automated Control Package provides
the developer with a dynamic link library (DLL) and supporting documentation to
allow custom software applications to directly control the Cyclone.
By storing the binary data information, algorithm
information, and settings directly into the FLASH memory of the Cyclone,
programming operations can be initiated by the simple push of a button.
However, the DLL enables us to use the PC to issue a command to the Cyclone to
start the same programming sequence!
The use of a PC to control the Cyclone enhances the
functionality of the stand-alone programming operations, but also introduces
new capabilities that were not available previously. In the following sections,
we explore the features of the Cyclone Automated Control Package and present
practical examples of how to use it in your own production line.
2.) Setup – Image Creation
The first step is always to create the actual stand-alone
images that will be stored onto the Cyclone. These images contain the algorithm
needed to program FLASH / EEPROM, the actual binary data to be programmed, the
sequence of programming operations, and many user-specified Cyclone settings.
PEmicro’s “Cyclone Image Creation Utility” allows the user to properly
configure the stand-alone images.
Above is a screenshot of the dialog in the Cyclone Image
Creation Utility which allows the user to configure the stand-alone image. The
field on the right shows the programming steps and also the order in which
these steps execute.
First, we select the appropriate algorithm for our
processor. In this example, we are using the Freescale
Next, we specify the target object file that represents
the binary data to be programmed into the processor’s FLASH memory. Here, we are
using a Motorola S-record file.
Once the algorithm and the target object file are
specified, we are ready to begin programming. Typically, the procedure is to
erase the device to make sure it’s blank, program the target, and verify that
the contents were written correctly.
In addition to the programming sequence, there are also
settings for the Cyclone that we can configure. In the above screenshot, we are
using the Cyclone PRO’s power relays to provide the appropriate voltage to power
up our processor. This way, we do not need a separate power supply for our
target board, simplifying our production line.
Finally, we specify the Image Description so that we can
easily identify the image later on. By using the “Store Image to Disk” option,
we are able to save this image and its configuration as a .SAP file for future
3.) Using the DLL – Simple Example
The above code example shows the most basic operation that
is supported by the Cyclone Automated Control Package. Below are the steps we have
Step 1: Contact the desired Cyclone by specifying its
IP address. The handle of the Cyclone is returned, and is used to identify the
Cyclone in all subsequent function calls.
Step 2: Send a command to the Cyclone to begin the
programming operations specified in image #1. These operations were specified
during the image creation process.
Step 3: Wait for the Cyclone to complete the
programming operations before proceeding.
Step 4: Check to see if any errors occurred during
programming and provide a message to the user.
Step 5: Terminate the current session with the
4.) Using the DLL – More Advanced Operations
Programming a serial number
Note: The following are placeholder functions used to
simplify the example, and are not provided by the automated control package:
The above example code is an event handler written for a
visual MFC application, which is executed each time a button is pressed by the
user. Here, we again instruct the Cyclone to perform the stand-alone
programming operations of the image stored on the Cyclone. Afterwards, we
program a dynamic 2-byte serial number into address 0x100 of the target
processor. The serial number is then incremented and written back to a file for
Although there are many different ways to program a serial
number without needing to use the automated control package at all, this code example can easily be
modified to program dynamic data that is not sequential. For example, if we
wish to program the current date or a lot number, using the automated control package and writing
your own custom application is by far the easiest and most automated way to
accomplish this task.
Automatically update image stored on the Cyclone
This is a very simple example of how to ensure that the
image stored on a Cyclone is always up to date. A comparison is performed
between the image which currently resides on the Cyclone and an image file at a
specified location on the host PC. If there is a mismatch, then we update the
image. Afterwards, we proceed with the normal programming operations as seen in
the previous examples.
5.) Can I Control Multiple Cyclones?
Up until now, we have discussed some uses of the
Cyclone Automated Control Package with a single Cyclone unit. Since the host PC only
sends minimal control information to control each Cyclone, a single PC is
actually capable of controlling many Cyclone units simultaneously.
Here, we begin programming operations on 3 separate Cyclone
units and wait for their completion before proceeding. In essence, we are
programming 3 separate devices in parallel. This can be easily extended to 10,
100, or even 1000 Cyclone units controlled in parallel from a single host PC!
6.) More Examples
Here are a few more real world examples:
Quality Control : automatically
record statistics on the number of devices that fail during programming.
You’re a developer and just completed the
firmware development for a brand new product. Now you need to get your
production facility up to speed, but they are halfway across the country.
Streamline this process by writing a simple application that will add a new
image to the Cyclone. Send this along with the new stand-alone image SAP file
and you’re done.
You use multiple Cyclone units for programming
your devices in parallel. Each Cyclone has 4 different images, one for each of
your 4 different products. Write an application that allows the user to
automatically select the correct image for the current production run.
Whether you are performing small production runs in-house or
programming a large number of chips in a high-volume facility, PEmicro’s
Cyclone product family provides a powerful, yet affordable, solution. With the
advanced parallel programming, image management, and error tracking features
provided by PEmicro’s new Cyclone Automated Control Package, you now have the power to
completely automate your production programming process like never before.
For more information, see also: