Keil Logo

GENERAL: CYGNAL DOWNLOAD VIA DLL AFFECTS CHECKSUM


Information in this article applies to:

  • C51 All Versions
  • Cygnal DLL V1.2.4

QUESTION

I'm working with Cygnal C8051F006 and my application calculates the flash checksum. Every time I download the same source code using Keil IDE ( via Cygnal DLL ), I get a different checksum value. It appears that the flash download via Keil IDE does not fully erase the whole flash before the download. Is this correct?

ANSWER

Yes, the DLL does not erase all of the code space on each program download. This is by design.

A download operation starts by reading the 512-byte flash sectors that contain an address included in the code image to be loaded. It then modifies only the bytes at the addresses included in the code image. Then, only the flash sectors that were read are erased and reprogrammed. The net effect is that only bytes that are part of the new code image to be downloaded are changed. All other addresses retain their previous values -- even those in a re-programmed flash sector.

This allows users to incrementally download code (e.g. load a library of routines or boot loader to one location in code space and then, later, load additional application code to another location).

To ensure all of the code space is erased before a download, you may use a stand-alone programming utility to erase code space or create a code image that uses every byte of code space, setting "unused" bytes to 0xFF.

SEE ALSO

Last Reviewed: Tuesday, April 20, 2004


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.