Ping Frames; Error Frames - STMicroelectronics STEVAL-IHP005V1 User Manual

Table of Contents

Advertisement

UM1619
6.6.2

Ping Frames

This particular frame is used to ping a remote (via PLM interface) or a local (via COMM
interface) module. When a ping frame is received, this is managed directly at data link layer
and is not notified at the application and consequently at the user levels.
From the COMM interface module (SPI, USART, USB, etc.)
buffer[0] = 10;
buffer[1] = APP_PING_FRAME;
buffer[2,3] = target_module.group;
buffer[4,5,6,7] = target_module.address;
buffer[8,9] = CRC16;
From / to communication interface (PLM, SPI, USART, USB, etc.)
frame.source = SOURCE_PLM / ...;
frame.type = APP_PING_FRAME;
frame.len = 0;
frame.broadcast = FALSE;
frame.group = target_module.group;
frame.address = target_module.address;
6.6.3

Error Frames

These can be considered data frames; they are user error frames from user application level
addressed to a target PLM module.
From the COMM interface module (SPI, USART, USB, etc.)
uint8_t *buffer;
buffer[0] = 12;
buffer[1] = APP_ERROR_FRAME;
buffer[2,3] = target_module.group;
buffer[4,5,6,7] = target_module.address;
buffer[8,9] = user_error_code;
buffer[10,11] = CRC16;
From / to communication interface (PLM, SPI, USART, USB, etc.)
APP_userdata_t frame;
frame.source = SOURCE_PLM / ...;
frame.type = APP_ERROR_FRAME;
frame.len = 2;
frame.broadcast = FALSE;
frame.group = target_module.group;
frame.address = target_module.address;
frame.data[0,1] = user_error_code;
Error code list
0x00 = APP_ERROR_
0x01 = APP_ERROR_GENERIC
0x02 = APP_ERROR_COMM_TIMEOUT
0x03 = APP_ERROR_SERVICE_GRP_UNKNOWN
0x04 = APP_ERROR_SERVICE_CMD_ERROR
0x05 = APP_ERROR_COMMUNICATION
0x06 = APP_ERROR_ISOLATED_NODE
0x07 = APP_ERROR_HARDWARE
0x08 = APP_ERROR_WRONG_PROG_COMMAND
0x09 = APP_ERROR_WRONG_PROG_GROUP
0x0a = APP_ERROR_DEVICE_BLANK
0x0b = APP_ERROR_RTC_ERROR
0x0c = APP_ERROR_WATCHDOG_DISABLED
0x0d = APP_ERROR_NODE_INIT_FAILED
0x0e = APP_ERROR_RTC_DISABLED
// Ping frame payload length (n + 11)
// Ping frame type
// Target device group (2 bytes)
// Target device address (4 bytes)
// CRC-16
// Data source PLM, ...
// Ping frame type
// Ping frame payload length
// Ping frames can be sent only in unicast
// Target device group (2 bytes)
// Target device address (4 bytes)
// Error frame payload length (12)
// Data frame type
// Target device group (2 bytes)
// Target device address (4 bytes)
// User error code (2 bytes)
// CRC-16
// Data source PLM, ...
// Error frame type
// Error frame payload length
// Error frames are sent in unicast
// Target device group (2 bytes)
// Target device address (4 bytes)
// User error code (2 bytes)
DocID024383 Rev 1
Firmware description
35/56

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STEVAL-IHP005V1 and is the answer not in the manual?

Table of Contents