MSP430IEC60730SWPackage
|
Functions | |
uint8_t | IEC60730_CRC_TEST_testNvMemory (uint16_t *pStartAddress, uint16_t memorySize, uint16_t *pExpectedCrc) |
uint8_t IEC60730_CRC_TEST_testNvMemory | ( | uint16_t * | pStartAddress, |
uint16_t | memorySize, | ||
uint16_t * | pExpectedCrc | ||
) |
Tests invariable (non volatile) memory (FLASH)
*pStartAddress | is a pointer the start address of memory to be tested |
memorySize | size of memory to be tested |
*pExpectedCrc | is a pointer to the expected CRC value |
The following function check for memory corruption in non volatile memory. The user must first calculate the CRC value of the memory to be checked. This can be achieved by using the CRC_tool which is included in the utils folders of the library. To learn how to use the CRC_tool please consult the IEC60730 Class B API User's Guide. When the CRC value is obtain, the user must store the CRC value in FLASH before calling the function. The memorySize paramater is specified in 16 bit words and should not exceed 65535 16 bit words. The expectedCrc value is compared to the newly calculated CRC value. The test passes if the two CRC values are identical.
NOTE: memorySize should be even an value, otherwise the the test fails.