ModusToolbox Safety Test Library
Loading...
Searching...
No Matches

General Description

Macros

#define FLASH_TEST_MODE   (FLASH_TEST_FLETCHER64)
 Supports two self test modes:
1) FLASH_TEST_CHECKSUM - performs a Checksum calculation on Flash
2) FLASH_TEST_CRC - Performs a CRC calculation on Flash.
#define ITER_COUNT_INIT_VALUE   (uint32_t)(1u)
 Initial value for Counter of Iteration in Fletcher32 Checksum algorithm.
#define LARGEST_NUM_OF_SUMS   (uint32_t)(359u)
 The magic value 359 is the largest number of sums that can be performed without numeric overflow.
#define CHECKSUM_INIT_VALUE   (uint32_t)(0xFFFFFFFFu)
 Init value for checksum calculation.
#define FLASH_DOUBLE_WORDS_TO_TEST   (uint32_t)(512u)
 Set size of one block in Flash test.
#define FLASH_RESERVED_CHECKSUM_SIZE   (8u)
 No of bytes to store the checksum.
#define FLASH_END_ADDR    (uint32_t)(CY_FLASH_BASE + CY_FLASH_SIZE - FLASH_RESERVED_CHECKSUM_SIZE)
 Define last Flash address which is used for checksum calculation.

Macro Definition Documentation

◆ LARGEST_NUM_OF_SUMS

#define LARGEST_NUM_OF_SUMS   (uint32_t)(359u)

The magic value 359 is the largest number of sums that can be performed without numeric overflow.

Given the possible initial starting value of sum1 = 0x1fffe. Any smaller value is also permissible; 256 may be convenient in many cases.

◆ FLASH_END_ADDR

#define FLASH_END_ADDR    (uint32_t)(CY_FLASH_BASE + CY_FLASH_SIZE - FLASH_RESERVED_CHECKSUM_SIZE)

Define last Flash address which is used for checksum calculation.

Last two bytes used for Flash checksum storing, So need to subtract "8"