Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

FLASH Checksum calculation

lock attach
Attachments are accessible only for community members.

FLASH Checksum calculation

Anonymous
Not applicable
Question: How can I execute a FLASH Checksum operation in user code?

 

Answer:

The function SSC_Action( FLASH_CHECKSUM) can be used to perform a device checksum operation. The checksum value is then stored in 0xF8 and 0xF9 locations. The RAM address 0xF8 holds the lower 8 bits of the checksum and 0xF9 holds the upper 8 bits of the checksum.

Find attached a project that calculates the checksum of the flash. Flashblock API cannot be used for calculating the checksum. To use the checksum function in your project:

1. Using the “Project >> Add File” menu, add the files ssc_utilities.asm and ssc_utilities.h files to your project.
2. Include ssc_utilities.h file in main.c
3. Now call the CalculateChecksum function and this function will return the checksum value.
4. See main.c of the attached project of how to use the CalculateChecksum function.

Note: PSoC Designer 3.2 version has bug which does not allow the function work properly.

Attachments
0 Likes
931 Views
Contributors