English
Language : 

UM1634 Datasheet, PDF (21/43 Pages) STMicroelectronics – Standard software driver for C90FL2 Flash
UM1634
API specification
3.6.6
CheckSum()
Description
The 'CheckSum()' API performs a 32-bit sum over the specified Flash memory range
without carry, which provides a rapid method for checking data integrity.
Prototype
UINT32 CheckSum (PSSD_CONFIG pSSDConfig,
UINT32 dest,
UINT32 size,
UINT32 *pSum,
void (*CallBack)(void));
Arguments
Argument
pSSDConfig
Dest
Size
pSum
CallBack
Table 19. Arguments for CheckSum()
Description
Range
Pointer to the SSD
Configuration Structure.
The values in this structure are chip-dependent.
Please refer to Section 3.3 for more details.
Destination address to be Any accessible address aligned on double word
summed in Flash memory. boundary in either main array or shadow row.
Size, in bytes, of the Flash
region to check sum.
If size is 0 and the other parameters are all valid,
C90FL_OK is returned. Its combination with dest
should fall within either main array or shadow row.
Returns the sum value.
0x00000000 - 0xFFFFFFFF. Note that this value is
only valid when the function returns C90FL_OK.
Address of void call back Any addressable void function address. To disable it
function pointer.
use NULL_CALLBACK macro.
Return values
Table 20. Return values for CheckSum()
Return Values
Possible Causes
Solution
C90FL_ERROR_ALIGNMENT
This error indicates that
dest/size isn’t properly
aligned
Check if dest and size are aligned
on double word (64-bit) boundary.
Check if source is aligned on word
boundary
C90FL_ERROR_RANGE
The area specified by dest
and size is out of the valid
C90FL address range.
Check dest and dest+size, both
should fall in the same C90FL
address ranges, i.e. both in main
array or both in shadow row
C90FL_OK
Successful completion.
Comments
None.
DocID024601 Rev 3
21/43