background image

May 2013

DocID024383 Rev 1

1/56

UM1619

User manual

General purpose ST7540 power line modem module based on

ST7540 PLM and STM32 microcontroller

Introduction

This document explains how to use and setup the firmware and the software designed for 
the STEVAL-IHP005V1 board and all the necessary setup for using the hardware.

The application firmware uses the ST7540 power line modem firmware stack driver 
described in the UM1573: “ST7540 power line modem firmware stack”, and is organized in a 
layer structure. A dedicated layer allows the user to design his own application interfacing to 
the module features with very simple and easy to use APIs. A dedicated software graphical 
user interface (GUI) allows the user to use all the embedded features interfacing the PLM 
module with the PC via an RS232 communication port.

This firmware is developed using STM32F10x Standard Peripherals Library Rel.3.5.0 and 
IAR Embedded Workbench® IDE for STM32 microcontrollers Rel. 6.3

The STEVAL-IHP005V1 hardware module embeds an ARM 32-bit Cortex™-M3 core-based 
STM32F103xB and a FSK power line transceiver ST7540.

Figure 1. STEVAL-IHP005V1

www.st.com

Summary of Contents for STEVAL-IHP005V1

Page 1: ...ck and is organized in a layer structure A dedicated layer allows the user to design his own application interfacing to the module features with very simple and easy to use APIs A dedicated software g...

Page 2: ...ngle tab 16 5 4 Operations tab 17 5 5 Program tab 19 5 6 Service tab 20 5 7 Sniffer tab 22 6 Firmware description 25 6 1 Introduction 25 6 2 Remote firmware update RFU 25 6 3 Firmware download 28 6 4...

Page 3: ...DocID024383 Rev 1 3 56 UM1619 Contents Appendix A Schematic diagrams and bill of material 47 A 1 Bill of material 49 Appendix B CRC 16 calculation 53 References 54 7 Revision history 55...

Page 4: ...connection 11 Figure 11 GUI options tab 12 Figure 12 GUI configuration tab 14 Figure 13 GUI dongle tab 17 Figure 14 GUI operations tab 18 Figure 15 GUI program tab 19 Figure 16 GUI service tab 20 Figu...

Page 5: ...line communication management 8 user configurable general purpose input output pins USART and SPI communication channel for module interfacing Internal configurable RTC module with lithium backup batt...

Page 6: ...lease refer to UM1573 for details on the firmware stack driver Some features are managed directly by the application engine and are transparent to the user such as the RTC management or the module par...

Page 7: ...the SPI interface pins MOSI MISO SCK and NSS are the RS232 interface pins Tx and Rx the USB interface pins D and D and the user programmable general purpose I O pins Note that these pins are directly...

Page 8: ...or his own application needs by means of dedicated APIs Finally a programming connector allows firmware download and debug even if it is possible to use the remote firmware update feature to remotely...

Page 9: ...version of the Windows OS installed on your PC may be determined by clicking on the System icon in the control panel 3 2 Software installation To install the PC GUI software Remote Console for GP ST7...

Page 10: ...d the license file and click the Yes button if you accept the license agreement Figure 7 License window 3 In the next window click Install In the following window select the folder in which to install...

Page 11: ...arted 4 after selecting the folder and clicking the Next button installation of the software starts Figure 9 Installation status window 5 When installation is complete click Finish The GUI is located...

Page 12: ...load procedure As soon as the application is launched the LEDs should quickly switch on and off sequentially and at the end the orange LED should be switched on indicating that the module needs to be...

Page 13: ...ev 1 13 56 UM1619 Hardware installation Figure 11 GUI options tab The module is now in programming mode the Programing mode message will flash at the bottom of the interface near the connected COM por...

Page 14: ...ted and the COM port selected as described in the Hardware Installation paragraph press the CONNECT button The module enters the programming mode the orange LED flashes twice and stay switched on In t...

Page 15: ...odule repeats statically each sensed frame without checking if the frame has been received acknowledged or not In both cases the anti collision mechanism explained in the UM1573 is always adopted The...

Page 16: ...re the connection and disconnection buttons As soon as the CONNECT button is pressed if the module is connected the Programming Mode message will flash at the bottom of the window and the module enter...

Page 17: ...e node time panel before pressing the SET TIME button The module has 8 general purpose input output pins that can be configured individually either as input pin or as output pin In order to know the a...

Page 18: ...des In order to configure a single node a remote node or the one connected to the GUI the node must be selected in the AVAILABLE NODE LIST window before to press any command button In broadcast mode t...

Page 19: ...cked As soon as the send message is sent the green LED of the module connected to the GUI is switched on When the LED is switched off the message has been sent to the target module or an error has occ...

Page 20: ...ing a constant in the firmware define USER_SETTINGS_SIZE directive in the interfaceconfig h file it is possible to store more then 800 bytes of user data Figure 15 GUI program tab As previously descri...

Page 21: ...sed after selecting the target node in the AVAILABLE NODE LIST Both the releases are then shown in the command window It is possible to modify some parameters that fine tune the power line modem commu...

Page 22: ...of a module connected remotely in the same power line both in broadcast mode and in unicast mode by selecting a node in the AVAILABLE NODE LIST This feature works only with remote nodes because if the...

Page 23: ...the module and press CTRL D or click Project Download Debug option Note that as soon as the sniffer bin file is downloaded in the module it will work only as a sniffer Connect the sniffer module to a...

Page 24: ...n The CLEAR button deletes all the sniffed data from the sniffer main window without deleting the sniffer file Each time a data frame is sniffed the log window is filled with some information concerni...

Page 25: ...ice destination address without group indication 5 Frame sent in Unicast U or Broadcast B 6 Frame with acknowledgment required A or not required A 7 Frame with back acknowledgment required b or not re...

Page 26: ...to the user as well as the module programming and configuration which is done by particular programming or service commands managed and acknowledged directly by the application engine the RTC manageme...

Page 27: ...culated and compared with the one sent by the remote PLM and after the reset vector address of the new firmware is written in a dedicated Flash segment of the bootloader Lastly the microcontroller is...

Page 28: ...5 7 567 9 725 7 803 72 1 33 7 21 5 66 9 725 7 5 67 5 33 7 21 5811 1 5 8 67 57 200 1 5 9 6 12 1 50 5 6 0 17 5 9 6 12 5 8 6 3 200 1 5 9 6 12 6725 680 6725 727 6 6725 6 0 17 1 7 6 21 0 7 7 9 1 5 66 2 6...

Page 29: ...s Project Download and Debug or press CTRL D keys Both firmware downloads start As soon as the download is completed press F5 in order to run the application or exit from the debug mode pressing the k...

Page 30: ...contains the sniffer workspace to download in a PLM module useful if the data sniffing feature of the interface is used In this case the PLM module will work only as a sniffer 6 4 Firmware descriptio...

Page 31: ...runs the PLM stack state machine while the first one calls the user program The user program implemented in this user manual implements a bridge between the power line communication and the COM port...

Page 32: ...or APP_ERROR_GENERIC 0x01 Generic communication error APP_ERROR_COMM_TIMEOUT 0x02 Communication timeout error APP_ERROR_SERVICE_GRP_UNKNOWN 0x03 Service group unknown error APP_ERROR_SERVICE_CMD_ERROR...

Page 33: ...et 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 Se...

Page 34: ...MM interface module SPI USART USB etc buffer 0 n 10 Data frame payload length n 10 buffer 1 APP_DATA_FRAME BROADCAST_FLAG Data frame type buffer 2 3 target_module group Target device group 2 bytes buf...

Page 35: ...level addressed to a target PLM module From the COMM interface module SPI USART USB etc uint8_t buffer buffer 0 12 Error frame payload length 12 buffer 1 APP_ERROR_FRAME Data frame type buffer 2 3 ta...

Page 36: ...echo service programming 6 6 5 Programming Frames Programming frames are used to program the PLM module parameters as the static address the AESkey if encryption is used the data link stack working m...

Page 37: ...st 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...

Page 38: ...buffer 1 APP_PROGRAMMING_FRAME buffer 2 3 target_module group buffer 4 5 6 7 target_module address buffer 8 PROG_CMD_SET_DATA buffer 9 PROG_GRP_USER_DATA buffer 10 29 user_data_buffer buffer 30 31 CR...

Page 39: ...ta 42 43 44 45 PLM_NTW_P_NDX_TO Minimum delay before any frame data 46 47 PLM_LL_MAX_ATTEMPT Max attempts if no activity is detected frame data 48 49 PLM_LL_MAX_RPT_ATTEMPT Max repetition attempts pro...

Page 40: ...ource SOURCE_PLM Data source PLM frame type APP_SERVICE_FRAME Service frame type frame len n 1 Service frame payload length frame broadcast TRUE FALSE TRUE broadcast FALSE unicast frame group target_m...

Page 41: ...rame 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 det...

Page 42: ...and echo frame data 2 3 PLM_MIN_SLOT Minimum backoff time frame data 4 5 PLM_MAX_SLOT Maximum backoff time frame data 6 7 PLM_NTW_P_GLOBAL_TX_TO Timeout for global tx frame data 8 9 10 11 PLM_NTW_P_BC...

Page 43: ...puts configuration uint8_t buffer buffer 0 11 buffer 1 APP_SERVICE_FRAME buffer 2 3 target_module group buffer 4 5 6 7 target_module address buffer 8 SERVICE_IO_CONFIG_GET buffer 9 10 CRC16 After a ce...

Page 44: ...buffer 9 target outputs_value buffer 10 11 CRC16 10 Get module firmware release uint8_t buffer buffer 0 11 buffer 1 APP_SERVICE_FRAME buffer 2 3 target_module group buffer 4 5 6 7 target_module addre...

Page 45: ...frame data 2 target_module minutes frame data 2 target_module seconds 12 Set module general purpose outputs value uint8_t buffer buffer 0 14 buffer 1 APP_SERVICE_FRAME buffer 2 3 target_module group...

Page 46: ...oid DH_SetOutput_N uint8_t out BitAction PinVal Module system time clock value set and get 3 bytes buffer h m s void DH_GetSysTime uint8_t timebuffer bool DH_SetSysTime uint8_t timebuffer Delay in mil...

Page 47: ...ure 25 Schematic diagrams 1 of 3 3 5 B 7 5 5 7 7 8 7 50 5 7 B0 52 1 1 1 20 9B9 9 9 9B9 9 9B9 9 5 5 1 0 5 X X 5 5 5 5 1 0 Q S Q 5 5 X Q 7 6 X 8 67 5 B 7 5 B3 69VV 7 B287 5672 7 9FF 0 3 B287 3 B 1 8 57...

Page 48: ...0 5 7 7 5 5 7 3 63 B166 63 B026 86 B86 0 86 B86 3 227 3 0 B 3 2 3 0 B 3 2 3 0 B 3 2 3 0 B 3 2 3 0 B 3 2 3 0 B 3 2 3 0 B 3 2 3 0 B 3 2 B0 52 9 9 9 9 4 8 670 7 75 3 7 03 5 57 9 7 3 26 B 1 3 26 B 1 3 26...

Page 49: ...citor MKP Through hole lead spacing 15 mm Epcos 1 C3 N M 1 C4 6 8 nF 10 50 V X7R ceramic capacitor SMD 0603 Any 5 C1 C5 C9 C1 6 C19 10 uF 10 35 V X6S ceramic capacitor SMD 1206 Murata 9 9 10 86 B86 3...

Page 50: ...COG ceramic capacitor SMD 0603 Any 1 C28 270 pF 5 50 Vdc COG ceramic capacitor SMD 0603 Any 1 D1 SM6T15CA 15 VDC Transil diode SMD SMB ST 2 D2 D4 BAT54S 40 V 300 mA Small signal Schottky diodes SMD S...

Page 51: ...1 R10 15 K 1 1 10 W Metal film resistor SMD 0603 Any 1 R11 1K1 1 1 10 W Metal film resistor SMD 0603 Any 1 R12 390 R 1 1 10 W Metal film resistor SMD 0603 Any 1 R13 2K7 1 1 10 W Metal film resistor SM...

Page 52: ...V low power up to 400 kbps RS 232 drivers and receivers SMD TSSOP16 ST 1 U4 USBUF02W 6 EMI filter and line termination for USB upstream ports SMD SOTT323 6 ST 1 Y1 16MHz 3 ppm Y ear HC 49 SMD Euroqua...

Page 53: ...x2640 0x2200 0xE2C1 0xE381 0x2340 0xE101 0x21C0 0x2080 0xE041 0xA001 0x60C0 0x6180 0xA141 0x6300 0xA3C1 0xA281 0x6240 0x6600 0xA6C1 0xA781 0x6740 0xA501 0x65C0 0x6480 0xA441 0x6C00 0xACC1 0xAD81 0x6D4...

Page 54: ...ferences 1 UM1573 2 ARM based 32 bit MCU STM32F10x Standard Peripheral Library Rel 3 5 0 2011 3 ST7540 FSK power line transceiver datasheets 2006 4 AN3046 5 IAR Embedded Workbench IDE for STM32 microc...

Page 55: ...DocID024383 Rev 1 55 56 UM1619 Revision history 7 Revision history Table 2 Document revision history Date Revision Changes 23 May 2013 1 Initial release...

Page 56: ...TUAL PROPERTY RIGHT ST PRODUCTS ARE NOT AUTHORIZED FOR USE IN WEAPONS NOR ARE ST PRODUCTS DESIGNED OR AUTHORIZED FOR USE IN A SAFETY CRITICAL APPLICATIONS SUCH AS LIFE SUPPORTING ACTIVE IMPLANTED DEVI...

Page 57: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information STMicroelectronics STEVAL IHP005V1...

Reviews: