User`s manual
60 rabbit.com The System Identification and User Blocks
7.1.2 Reading the System ID Block
To read the ID block from the flash instead of getting the information from SysIDBlock, call
_readIDBlock().
_readIDBlock
int _readIDBlock(int flash_bitmap);
DESCRIPTION:
Attempts to read the system ID block from the highest flash quadrant and save it in the system ID
block structure. It performs a CRC check on the block to verify that the block is valid. If an error
occurs, SysIDBlock.tableVersion is set to zero.
This function supports combined System ID/User blocks sizes of sizeof(SysIDBlock) and
from 4KB to 64KB, inclusive, in 4KB steps. Prior versions of Dynamic C only supported mirrored
combined block sizes of sizeof(SysIDBlock), 8KB, 16KB and 24KB or unmirrored com-
bined System ID/User blocks sizes of sizeof(SysIDBlock) and from 4KB to 32KB, inclu-
sive, in 4KB steps.
PARAMETER
flash_bitmap Bitmap of memory quadrants mapped to primary flash.
Examples:
0x01 = quadrant 0 only
0x03 = quadrants 0 and 1
0x0C = quadrants 2 and 3
RETURN VALUE:
0: Successful
-1: Error reading from flash
-2: ID block missing
-3: ID block invalid (failed CRC check)
LIBRARY
IDBLOCK.LIB