PEmicro | Experts in Embedded tools for Flash Programming and Development
Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service


by Johnny Ng


A common method that our clients use to verify the data integrity of a device under test is to calculate a checksum and then compare it against a known good value. To help make this task easier, PEmicro has added the ability to calculate and retrieve the checksum of a device under test. This feature is available on the Cyclone LC and Cyclone FX, starting with software release v.10.49. The most recent Cyclone software is always available on the Support & Downloads tab of the Cyclone product pages.

Types of Checksums

The Cyclone can perform two types of verification using CRC-16 checksums:

  1. There is a  CRC-16 calculated from the addresses programmed on the device which is compared against the CRC-16 calculated from the raw data in the object file. This type of verification requires the addition of the Verify Checksum (VC) command into your programming script. Within the Cyclone Image Creation Utility, click on the Show Device CRC button to display the expected value calculated from the object file.

Figure 1: Adding the Verify Checksum (VC) command

Figure 2: Show Device CRC will display the expected CRC value ($6FC6)

  1. There is a CRC-16 calculated from the entire programmed device which is compared against a specified value. This requires the addition of the Verify Module CRC to Value (VV) command into your programming script.

Figure 3: Adding the Verify Module CRC to Value (VV) Command with specified CRC Value ($8630)

After the device under test has been programmed, the CRC-16 will be calculated and retrieved by the Cyclone. Not all algorithms support the VC or VV commands. If your algorithm is missing them, please contact our technical support department for assistance.

Displaying the Checksum

The Cyclone can show the two checksums on its display after the SAP image executes successfully. These are the steps to add them to the display: 

Menu -> Configure Cyclone -> Configure Screen -> Configure Home Screen -> Select Display Line -> Element: Object File CRC (VC) Calculated from Target

Menu -> Configure Cyclone -> Configure Screen -> Configure Home Screen -> Select Display Line -> Element: Whole Device CRC (VV) Calculated from Target

You can access and view the screen remotely using the Cyclone Control GUI’s Remote Display tab.

  Figure 4: The two checksums displayed on the Cyclone's LCD

Retrieving the Checksum Programmatically

You can retrieve the two checksums from the command line with the cycloneControlConsole application or programmatically in your application using the Cyclone Control SDK. The checksums are the targetobjectcrc and targetdevicecrc properties which are part of the targetproperties category.

Using Cyclone Control Console

CycloneControlConsole.exe -cyclone=10.0.9.13 -getproperty=targetproperties,1,targetobjectcrc -getproperty=targetproperties,1,targetdevicecrc

  Figure 5: The two checksums can be retrieved with the Cyclone Control Console

Using Cyclone Control SDK

To use the Cyclone Control SDK in your application, use Category "targetproperties" and Property "targetobjectcrc" or "targetdevicecrc". If you have any questions about using Cyclone Control SDK with properties, please refer to Section 3c “Working With Properties“ in the Cyclone Control SDK blog post.

Verification Failure

Here the wrong whole device CRC16 is specified using the previous example in Figure 3 to show what happens when there is a verification failure. The result is an error code that is usually in the $4001 to $4013 range displayed on the screen after the SAP image executes.

Figure 6: Verification Failure (Error Result)

Conclusion

PEmicro anticipates that adding the ability to calculate and retrieve a checksum will be helpful for Cyclone users, by making it very simple to accomplish this common task.





search in blog posts

Tags

Product pages
Cyclone (73)
Cyclone FX (76)
Multilink (44)
Multilink FX (39)
GDB Server (15)
Prog ACMP (15)
Interface Library Routines (5)


Manufacturer
ARM (61)
NXP (70)
Microchip (7)
Cypress (7)
Infineon (5)
Maxim (3)
Nordic Semiconductor (3)
Silergy Teridian (1)
Silicon Labs (5)
STMicroelectronics (9)
Texas Instruments (2)
Toshiba (3)
Renesas (8)


Categories
Production Programming (79)
Debug (45)
Automated Control (20)
Miscellaneous (38)



© 2020 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement