Firmware description
The data type for the "dongle.h" module; "stm32f10x_gpio" module are listed hereafter:
/* LED TYPE */
typedef enum
{
A_LED_ERROR,
A_LED_DATA,
A_LED_BOTH
}DH_LedType_t;
/* LED STATUS */
typedef enum
{
A_LED_ON,
A_LED_OFF,
A_LED_FLASH
}DH_LedAction_t;
/* PIN VALUE */
typedef enum
{
Bit_RESET = 0,
Bit_SET
}BitAction;
6.6
Firmware frame types
This paragraph describes all the frame type that are implemented in this firmware. In each
field there is also a description.
6.6.1
Data Frames
Data frames are frames exchanged between two PLM modules or between a PLM module
and an external device connected to the COMM interface.
From the COMM interface module (SPI, USART, USB etc.)
buffer[0] = n + 10;
buffer[1] = APP_DATA_FRAME | BROADCAST_FLAG;
buffer[2,3] = target_module.group;
buffer[4,5,6,7] = target_module.address;
buffer[8,..8+n-1] = user_data[n];
buffer[8+n,8+n+1] = CRC16;
/* BROADCAST_FLAG = 0x80 -> data sent in broadcast - BROADCAST_FLAG = 0x00 -> data sent in
unicast */
From / to communication interface (PLM, SPI, USART, USB, etc.)
frame.source = SOURCE_PLM / ...;
frame.type = APP_SERVICE_FRAME;
frame.len = n;
frame.broadcast = TRUE / FALSE;
frame.group = target_module.group;
frame.address = target_module.address;
frame.data[n] = service_data[n];
34/56
// Data frame payload length (n + 10)
// Data frame type
// Target device group (2 bytes)
// Target device address (4 bytes)
// User data (n bytes, at least 1)
// CRC-16
// Data source PLM, ...
// Data frame type
// Data frame payload length
// TRUE = broadcast, FALSE = unicast
// Target device group (2 bytes)
// Target device address (4 bytes)
// User data (n bytes)
DocID024383 Rev 1
UM1619
Need help?
Do you have a question about the STEVAL-IHP005V1 and is the answer not in the manual?
Questions and answers