PEmicro Blog

Using Automatically Counting Serial Numbers Managed on the Cyclone

Jan 22, 2019

PEmicro's Cyclone programmers are able to internally store and track serial numbers though the use of a unique serial number ID. This increased sophistication allows Stand-Alone Programming (SAP) images stored on a Cyclone to share serial numbers that reference the same unique serial number ID. There are several cases where this is very useful. The first is when a user may want to update their firmware for a product to a new version but the serial number to have persistence.  The user may also have different products that need to be programmed with different firmware, but still want have those products draw from the same serialization sequence.  

This serialization article will cover the serial number serialization utility, serial number format and features, creation of a SAP image with multiple serial numbers, how to create and view the properties of a SAP image with multiple serial numbers in the Cyclone Control GUI, and the results of programming with two different SAP images that use a shared serial number within a Cyclone.  

Serialization Utility

An important aspect of the Serialization utility is that it automatically creates a Unique ID anytime a serial file is created or modified. This allows the Cyclone to have different SAP images to use the same serial file.   Any changes in the serial file with the utility, will generate a new unique ID so there are no duplicates. Other additional features included a Notes field, the ability to have the serial number automatically count up by a user defined number n, as well as an easy way to set the byte program order. Below is the view of the newly updated Serialization Utility.

Figure 1: Serialization Utility

Another significant aspect of the utility is that the generated serial file is stored in JSON format which is a powerful way to save and parse the information. The serial JSON format and shared serial numbers work for Cyclone LC firmware versions 10.13 and later and Cyclone FX firmware version 10.13 and later. Older model Cyclone PRO and Cyclone MAX programmers require the older format text serial files and SAP image generation tools. Software for these legacy Cyclone models can be found on their respective product pages under the support and downloads tab. 

Users that wish to retrieve the original text serial number format can parse out the JSON file: 

object->pesettings-> serial_number_definition -> legacyv1encoding 

Below is a screen snapshot of the saved serialfile as seen from a JSON viewer.  

Figure 2: Serial File in JSON Viewer

Creation of a SAP image with Multiple Serial Numbers

In the following example, a SAP image was created that uses selects and programs two different serial numbers into different locations in memory. The first serial number counts by two with starting address 0x00020000 and the second serial number counts by four with starting address 0x00021000. The Algorithm is selected, followed by the S19 file. The part is erased, and then the s19 is programmed into the device. Once this is done, the first serial file is selected and programmed and then the second is too.  These same unique serial numbers may be used by other SAP images, and each program will increase the serial number by the designated count defined in the serial number file.  

Figure 3: Cyclone Image Creation Utility

View and Edit serialized SAP image with Cyclone control GUI

Cyclone control GUI was launched and is looking at the image contents of Cyclone FX.  In this case, there are four different SAP images on the Cyclone named Colossus.  To view properties of a particular image properties, simply right click on the desired image and select view properties which will pop up an image properties window.  In this case, Image ‘Kinetis K64 PE S2 and Mac S4’, the Image Unique ID is visible as well as the two serial numbers and their respective Unique IDs.  It also shows the next serial numbers (in ASCII representation) to be programmed upon launch PE-000 and MAC-00< respectively. 

Figure 4: Cyclone Control GUI

Deleting the image will not delete the associated serial number as other images stored on the Cyclone may be using that same serial number. The serial number is tracked on the Cyclone by the imageuniqueid json property.  If any image is added back onto the Cyclone with that same Serial Unique ID, it will continue to track with that same serial number at the latest count.  So if a user has a new version of their firmware, they can create a new SAP image that uses the same serial number as the previous firmware (referenced by same serial unique ID) and the programming will continue the serial number sequence from the current serial number state since that serial file is stored on the Cyclone.

Once a SAP image is loaded with a serial file, and it is selected as the current image on the Cyclone, it is possible to adjust the serial count.  This is done by navigating through the following screens on the Cyclone.  

Menu → Current Image Options  →  Serial Number

If the image has more than one serial number incorporated into the SAP image, select the Serial number which is to be modified. Otherwise just select ‘Modify Serial’.

Figure 5: Cyclone Menu Selection

It is possible to Decrease or Increase the Next Serial by -10, -1, +1, +10.  This is often done to address issues in the production process, such as during initial setup. 

Figure 6: Increase or Decrease Serial Number

Note, that the Cyclone Control GUI has the ability to show all the Serial Files stored on the Cyclone. This is done by opening a Cyclone, and then navigating to the Serial Files Tab.  The Serial File tab has a Delete Button at the bottom which will remove the selected serial file from view and reset the tracking of the serial number to its original state.  This does not actually delete the serial file. Once any programming is initiated  using this ‘deleted’ serial file, the serial file will reappear back in the list and program using the original serial number.  

Programming SAP images with Shared Serialization

In this example, we have two SAP images stored on the Cyclone: The first is ‘Waynes SAP Image Serialx2’  and the second is ‘Garths SAP Image Serialx2’.  They both use the same serial file named ‘PEserial K64 Count by 2’ which has a unique ID ser-4FD596BF-7DDD6470-5BDAE9E7 and the next serial number to be programmed(in ASCII) is PE-002.  If we select Waynes SAP image we can see this current PE-002.

Figure 7: View Current Serial Number for "Wayne's SAP Image"

Once programmed is initiated, PE-002 is programmed into memory and the screen shows the next serial number to be programmed is which is PE-004.

Figure 8: Serial Number Incremented for "Wayne's SAP Image"

If now the Garths SAP Image is selected on the Cyclone it will show the next serial number to be programmed is PE-004 because it tracks the same serial number.

Figure 9: Serial Number Also Incremented for "Garth's SAP Image"

Conclusion

Shared serial numbers within a Cyclone-series programmer allow great flexibility in the production programming process. It allows the programming process to share a single serial number for different images within a Cyclone via a unique serial number ID.  

Tags related to this Blog Post

Cyclone     Cyclone FX     ARM     NXP     Production Programming     Automated Control