Command Packet - NXP Semiconductors freescale KV4 Series Reference Manual

Table of Contents

Advertisement

uint16_t crc16_update(const uint8_t * src, uint32_t lengthInBytes)
{
uint32_t crc = 0;
uint32_t j;
for (j=0; j < lengthInBytes; ++j)
{
uint32_t i;
uint32_t byte = src[j];
crc ^= byte << 8;
for (i = 0; i < 8; ++i)
{
uint32_t temp = crc << 1;
if (crc & 0x8000)
{
temp ^= 0x1021;
}
crc = temp;
}
}
return crc;
}

14.2.5.4 Command packet

The command packet carries a 32-bit command header and a list of 32-bit parameters.
Command Header (4 bytes)
Tag
Flags
Rsvd
Param
Count
byte 0
byte 1
byte 2
byte 3
Freescale Semiconductor, Inc.
Table 14-7. Command Packet Format
Command Packet Format (32 bytes)
28 bytes for Parameters (Max 7 parameters)
Param1
Param2
Param3
(32-bit)
(32-bit)
(32-bit)
KV4x Reference Manual, Rev. 2, 02/2015
Preliminary
Chapter 14 Kinetis Flashloader
Param4
Param5
Param6
(32-bit)
(32-bit)
(32-bit)
Param7
(32-bit)
225

Advertisement

Table of Contents
loading

Table of Contents