EasyManua.ls Logo

STMicroelectronics STEVAL-IHP005V1 - Page 41

STMicroelectronics STEVAL-IHP005V1
57 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DocID024383 Rev 1 41/56
UM1619 Firmware description
2) Set module parameters: data link stack parameters
uint8_t *buffer;
buffer[0] = 62;
buffer[1] = APP_SERVICE_FRAME;
buffer[2,3] = target_module.group;
buffer[4,5,6,7] = target_module.address;
buffer[8] = SERVICE_PARAM_SET;
buffer[9] = PROG_GRP_LL_STACK_PARAM;
/* STACK PARAMETERS */
buffer[10,11] = PLM_MIN_SLOT; // Minimum backoff time
buffer[12,13] = PLM_MAX_SLOT; // Maximum backoff time
buffer[14,15] = PLM_NTW_P_GLOBAL_TX_TO; // Timeout for global tx
buffer[16,17,18,19] = PLM_NTW_P_BC_GLOBAL_TX_TO; // Timeout for broadcast frame retransmission
buffer[20,21] = PLM_NTW_P_ACTIVITY_TO; // Timeout for network
buffer[22,23] = PLM_NTW_P_WATCHDOG_TO; // Watchdog timeout
buffer[24,25,26,27] = PLM_NTW_P_DATATRANSFER_TO; // Timeout for completing a transfer from
source to target
buffer[28,29] = PLM_NTW_P_BANDINUSE_TO; // Timeout for the band in use signal
buffer[30,31,32,33] = PLM_NTW_P_FRAME_TX_TO; // Timeout for sending a frame through SPI
buffer[34,35,36,37] = PLM_NTW_P_BCAST_TX_TO; // Timeout for repeat a broadcast frame
buffer[38,39,40,41] = PLM_NTW_P_ACK_RX_TO; // Timeout for receiving an ACK frame
buffer[42,43,44,45] = PLM_NTW_P_bACK_RX_TO; // Timeout for receiving a bACK frame
buffer[46,47,48,49] = PLM_NTW_P_FRM_RX_TO; // Timeout for frame receptions
buffer[50,51,52,53] = PLM_NTW_P_NDX_TO; // Minimum delay before any
buffer[54,55] = PLM_LL_MAX_ATTEMPT; // Max attempts if no activity is detected
buffer[56,57] = PLM_LL_MAX_RPT_ATTEMPT; // Max repetition attempts (for processed ID)
buffer[58,59] = DEVICE_TIME_SYNC; // Timeclock update synchro frame interval
buffer[60,61] = CRC16;
3) Set module parameters: programming module parameters
uint8_t *buffer;
/* IF AES ENCRYPTION IS ENABLED */
buffer[0] = 36;
/* IF AES ENCRYPTION IS DISABLED */
buffer[0] = 20;
buffer[1] = APP_SERVICE_FRAME;
buffer[2,3] = target_module.group;
buffer[4,5,6,7] = target_module.address;
buffer[8] = SERVICE_PARAM_SET;
buffer[9] = PROG_GRP_DEVICE_DATA;
buffer[10,11] = new_group;
buffer[12,13,14,15] = new_address;
buffer[16] = (uint8_t)module_working_mode;
buffer[17] = hop_level;
/* IF AES ENCRYPTION IS ENABLED */
buffer[18 -> 33] = *AES_key_buffer; // AES Key 0 to 15, 16 bytes
buffer[34,35] = CRC16;
/* IF AES ENCRYPTION IS DISABLED */
buffer[18,19] = CRC16;
module_working_mode
-------------------------
b7 b6 b5 b4 b3 b2 b1 b0
-------------------------
| | | | | | | +-- 1 = Reserved
| | | | | | +----- 1 = ACK frame requested 0 = ACK frame not requested
| | | | | +-------- 1 = bACK frame requested 0 = bACK frame not requested
| | | | +----------- 1 = Dongle works also as a repetitor 0 = Dongle doesn't repead frames
| | | +-------------- 1 = Static repeater behaviour 0 = Repeat only frames with no
| | | response
| | +----------------- 1 = Grouping filter (subnet) enabled 0 = Grouping filter disabled
| +-------------------- 1 = Encrypted data 0 = Clear data
+----------------------- 1 = Reserved

Table of Contents

Related product manuals