S
ERIAL
I
NTERFACE
D
EVELOPERS
G
UIDE
5.3.2 CMD_PROG_SFLASH_FULL
Description: Program a full page to serial flash. The data to be programmed will need to be written to
the scratch pad (DSP memory location 0x00C0) before initiating this command. The offset for the
write into serial flash will be 0 regardless of the structure value.
Command Code: Enumeration for CMD_PROG_SFLASH_FULL
Argument Size: size of flash_XFER
Argument: See below.
struct _flash_XFER {
WORD
eraseFlag;
// Status Flag to check if flash is erased
WORD
page;
// Start Page in Serial flash (0 - 4095)
WORD
offset;
// Offset for smaller than page size xfers ( < 264)
WORD
size;
// Size in Bytes to program to flash (<= 264)
};
Note: Use the McbWriteDataMem function to move data into scratch pad.
5.3.3 CMD_PROG_SFLASH_PARTIAL
Description: Programs a partial page to serial flash. The data to be programmed will need to be
written to the scratch pad (DSP memory location 0x00C0) before initiating this command.
Command Code: Enumeration for CMD_PROG_SFLASH_FULL
Argument Size: size of flash_XFER
Argument: See below.
struct _flash_XFER {
WORD
eraseFlag;
// Status Flag to check if flash is erased
WORD
page;
// Start Page in Serial flash (0 - 4095)
WORD
offset;
// Offset for smaller than page size xfers ( < 264)
WORD
size;
// Size in Bytes to program to flash (<= 264)
};
Note: Use the McbWriteDataMem function to move data into scratch pad.
5.3.4 CMD_PROG_PRODUCT_ID
Description: Program DSP Data flash with Product ID’s. The product ID’s will need to be written to
the scratch pad (DSP memory location 0x00C0) before initiating this command. The product ID data
is written to the DSP data flash starting at address 0x2000.
Command Code: Enumeration for CMD_PROG_PRODUCT_ID
Argument Size: 0
Argument: Null
Note: Use the McbWriteDataMem function to move data into scratch pad. Associated data structures
listed below:
/* General Structure to hold component revision, type, and serial number */
struct _COMP_SER_NUM
{
Word16 RevAndType;
UWord32
SerNum;
};
/* Size = 3 Words */
typedef struct _COMP_SER_NUM COMP_SER_NUM, *PTR_COMP_SER_NUM;
/* Top level structure to hold info on each defined component */
struct _PRODUCT_ID
{
COMP_SER_NUM camera;
COMP_SER_NUM controllerBD;
COMP_SER_NUM camSupportBD;
7