Atmel Software Framework

flip_protocol.h File Reference

FLIP protocol definitions.

Copyright (c) 2011-2012 Atmel Corporation. All rights reserved.

Data Structures

struct  flip_msg_v1_t
 FLIP message structure. More...
 
struct  flip_msg_v2_t
 FLIP message structure. More...
 

Macros

#define FLIP_PROTOCOL_VERSION_0   0
 
#define FLIP_PROTOCOL_VERSION_1   1
 
#define FLIP_PROTOCOL_VERSION_2   2
 
#define FLIP_V1_BUF_TRANS_SIZE   1024
 Size of buffer used by FLIP to receive or send data. More...
 
#define FLIP_V2_BUF_TRANS_SIZE   (2*1024)
 Size of buffer used by FLIP to receive or send data Note: Write uses 2K and Read uses 1KB. More...
 
FLIP commands
#define FLIP_V1_CMD_PROG_START   0x01
 
#define FLIP_V1_CMD_READ   0x03
 
#define FLIP_V1_CMD_WRITE   0x04
 
#define FLIP_V1_CMD_READ_ID   0x05
 
#define FLIP_V1_CMD_CHANGE_BASE_ADDR   0x06
 
FLIP_V1_CMD_PROG_START first argument
#define FLIP_V1_CMD_PROG_START_ARG_FLASH   0x00
 
#define FLIP_V1_CMD_PROG_START_ARG_EEPROM   0x01
 
#define FLIP_V1_CMD_PROG_START_ARG_CUSTOM   0x08
 
FLIP_V1_CMD_READ first argument
#define FLIP_V1_CMD_READ_ARG_FLASH   0x00
 
#define FLIP_V1_CMD_READ_ARG_FLASHCHECK   0x01
 
#define FLIP_V1_CMD_READ_ARG_EEPROM   0x02
 
#define FLIP_V1_CMD_READ_ARG_CUSTOM   0x03
 
FLIP_V1_CMD_WRITE first argument
#define FLIP_V1_CMD_WRITE_ARG_ERASE   0x00
 
#define FLIP_V1_CMD_WRITE_ARG_RST   0x03
 
FLIP_V1_CMD_WRITE_ARG_ERASE following argument
#define FLIP_V1_CMD_WRITE_ARG_ERASE_CHIP   0xFF
 
FLIP_V1_CMD_WRITE_ARG_RST following arguments
#define FLIP_V1_CMD_WRITE_ARG_RST_HW   0x00
 
#define FLIP_V1_CMD_WRITE_ARG_RST_SF   0x01
 
FLIP_V1_CMD_READ_ID first argument
#define FLIP_V1_CMD_READ_ID_ARG_BOOTLOADER   0x00
 
#define FLIP_V1_CMD_READ_ID_ARG_SIGNATURE   0x01
 
FLIP_V1_CMD_READ_ID_ARG_SIGNATURE following arguments
#define FLIP_V1_CMD_READ_ID_SIGNATURE_ARG_MANUF   0x30
 
#define FLIP_V1_CMD_READ_ID_SIGNATURE_ARG_FAMILY   0x31
 
#define FLIP_V1_CMD_READ_ID_SIGNATURE_ARG_PRODUCT   0x60
 
#define FLIP_V1_CMD_READ_ID_SIGNATURE_ARG_REVISION   0x61
 
FLIP_V1_CMD_CHANGE_BASE_ADDR first argument
#define FLIP_V1_CMD_CHANGE_BASE_ADDR_ARG0   0x03
 
#define FLIP_V1_CMD_CHANGE_BASE_ADDR_ARG1   0x00
 
Command Groups
#define FLIP_V2_CMD_GRP_DNLOAD   0x01
 
#define FLIP_V2_CMD_GRP_UPLOAD   0x03
 
#define FLIP_V2_CMD_GRP_EXEC   0x04
 
#define FLIP_V2_CMD_GRP_SELECT   0x06
 
FLIP_V2_CMD_GRP_DNLOAD first argument
#define FLIP_V2_CMD_PROGRAM_START   0x00
 
FLIP_V2_CMD_GRP_UPLOAD first argument
#define FLIP_V2_CMD_READ_MEMORY   0x00
 
#define FLIP_V2_CMD_BLANK_CHECK   0x01
 
FLIP_V2_CMD_GRP_EXEC first argument
#define FLIP_V2_CMD_ERASE   0x00
 
#define FLIP_V2_CMD_START_APPLI   0x03
 
FLIP_V2_CMD_ERASE following argument
#define FLIP_V2_CMD_ERASE_ARG_CHIP   0xFF
 
FLIP_V2_CMD_START_APPLI following arguments
#define FLIP_V2_CMD_START_APPLI_ARG_RESET   0x00
 
#define FLIP_V2_CMD_START_APPLI_ARG_NO_RESET   0x01
 
FLIP_V2_CMD_GRP_SELECT first argument
#define FLIP_V2_CMD_SELECT_MEMORY   0x03
 
FLIP_V2_CMD_SELECT_MEMORY following arguments
#define FLIP_V2_CMD_SELECT_MEMORY_ARG_UNIT   0x00
 
#define FLIP_V2_CMD_SELECT_MEMORY_ARG_PAGE   0x01
 
FLIP_V2_CMD_SELECT_MEMORY_ARG_UNIT following arguments

Memory units field

#define FLIP_V2_CMD_SELECT_MEM_FLASH   0x00
 
#define FLIP_V2_CMD_SELECT_MEM_EEPROM   0x01
 
#define FLIP_V2_CMD_SELECT_MEM_SECURITY   0x02
 
#define FLIP_V2_CMD_SELECT_MEM_CONFIGURATION   0x03
 
#define FLIP_V2_CMD_SELECT_MEM_BOOTLOADER   0x04
 
#define FLIP_V2_CMD_SELECT_MEM_SIGNATURE   0x05
 
#define FLIP_V2_CMD_SELECT_MEM_USER   0x06
 
#define FLIP_V2_CMD_SELECT_MEM_INT_RAM   0x07
 
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS0   0x08
 
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS1   0x09
 
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS2   0x0A
 
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS3   0x0B
 
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS4   0x0C
 
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS5   0x0D
 
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS6   0x0E
 
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS7   0x0F
 
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_DF   0x10
 
#define FLIP_V2_CMD_SELECT_MEM_COUNT   0x11
 

#define FLIP_V1_CMD_CHANGE_BASE_ADDR_ARG0   0x03
#define FLIP_V1_CMD_CHANGE_BASE_ADDR_ARG1   0x00
#define FLIP_V2_CMD_SELECT_MEM_BOOTLOADER   0x04
#define FLIP_V2_CMD_SELECT_MEM_CONFIGURATION   0x03
#define FLIP_V2_CMD_SELECT_MEM_COUNT   0x11
#define FLIP_V2_CMD_SELECT_MEM_EEPROM   0x01
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS0   0x08
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS1   0x09
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS2   0x0A
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS3   0x0B
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS4   0x0C
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS5   0x0D
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS6   0x0E
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_CS7   0x0F
#define FLIP_V2_CMD_SELECT_MEM_EXT_MEM_DF   0x10
#define FLIP_V2_CMD_SELECT_MEM_FLASH   0x00
#define FLIP_V2_CMD_SELECT_MEM_INT_RAM   0x07
#define FLIP_V2_CMD_SELECT_MEM_SECURITY   0x02
#define FLIP_V2_CMD_SELECT_MEM_SIGNATURE   0x05
#define FLIP_V2_CMD_SELECT_MEM_USER   0x06
#define FLIP_V2_CMD_SELECT_MEMORY   0x03

Referenced by udi_dfu_flip_msg_decode().

#define FLIP_V2_CMD_SELECT_MEMORY_ARG_PAGE   0x01
#define FLIP_V2_CMD_SELECT_MEMORY_ARG_UNIT   0x00