DocID024383 Rev 1
33/56
UM1619
Firmware description
USER_DATA_BUSY,
USER_DATA_IDLE
}
APP_userflag_t;
/* PROGRAMMING COMMANDS */
typedef enum
{
PROG_CMD_IDLE = 0x00,
// No command
PROG_CMD_ENTER_PROG_MODE = 0x01,
// Enter the programming mode
PROG_CMD_EXIT_PROG_MODE = 0x02,
// Exit from programming mode
PROG_CMD_SET_DATA = 0x03,
// Write data into the internal flash
PROG_CMD_GET_DATA = 0x04,
// Get data from internal flash
PROG_CMD_CLEAR_DATA = 0x05,
// Clear data resetting the programming flag
PROG_CMD_DEVICE_BLANK = 0x06
// Device blank: run mode impossible
}
APP_PROG_CMD_t
;
/* PROGRAMMING GROUPS */
typedef enum
{
PROG_GRP_DEVICE_DATA = 0x00,
// Device Data
PROG_GRP_LL_STACK_PARAM = 0x01,
// Link layer stack parameters
PROG_GRP_USER_DATA = 0x02
// User program
}
APP_PROG_GROUP_t
;
/* SERVICE COMMANDS */
typedef enum
{
/* NATIVE SERVICE COMMANDS */
SERVICE_SOFTWARE_RESET = 0x00,
// Reset internal state machines
SERVICE_HARDWARE_RESET = 0x01,
// Module hardware reset
SERVICE_PARAM_SET = 0x02,
// Set service parameters
SERVICE_PARAM_GET = 0x03,
// Get service parameters
SERVICE_INPUTS_GET = 0x04,
// Get general purpose inputs pin status
SERVICE_OUTPUTS_SET = 0x05,
// Set general purpose outputs pins value
SERVICE_FW_REL_GET = 0x06,
// Get the stack and the module firmware release
SERVICE_PLM_CLOCK_SET = 0x07,
// Set the internal time clock value
SERVICE_PLM_CLOCK_GET = 0x08,
// Get the internal time clock value
SERVICE_IO_CONFIG_SET = 0x09,
// Set the general purpose input and output pins
SERVICE_IO_CONFIG_GET = 0x0a
// Get the general purpose input and output pins
/* USER DEFINED SERVICE COMANDS */
// SERVICE_USER_CMD_xx = 0x..,
// User defined service commands (0x0b to 0x7f)
}
APP_SER_CMD_t
;
/* TRANSIT DATA SERVICE FLAGS */
typedef struct
{
APP_TF_t
type;
uint8_t
FECcorrections;
// Number of FEC correction to the sensed frame
bool
wrongpostamble;
// Frame with for a wrong postamble
bool
wrongCRC;
// Frame with a wrong CRC
bool
hopoverrun;
// Frame with a HOP overrun
bool
framerejected;
// TRUE = Frame rejected, FALSE = frame accepted
}
APP_SER_FLAGS_t
;
/* TRANSIT FRAME TYPE */
typedef enum
{
APP_TF_DATA = 0x00,
// Data
APP_TF_ERROR = 0x01,
// Error
APP_TF_PROGR = 0x02,
// Programming
APP_TF_RES = 0x03,
// Result (response to a query, same as data frame)
APP_TF_ACK = 0x04,
// ACK
APP_TF_bACK = 0x05,
// back ACK
APP_TF_PING = 0x06,
// Ping
APP_TF_SERVICE = 0x07,
// Service
APP_TF_UNKNOWN = 0x7f
// Unknown type
}
APP_TF_t
;