UM0239 STMICROELECTRONICS | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 44
Technical content
Datasheet sections
- 1 Installation information
- 1.1 Software license agreement
- 1.2 System requirements
- 1.3 Installing the software
- 1.4 Release information and boards supported
- 1.5 Reference documents
- 2 Commonly used terms
- 3 User interface
- 3.1 Menu bar
- 3.2 Toolbar
- 3.3 Status bar
- 4 Getting started
- 4.1 Selecting the COM port
- 4.2 Setting the Control Register parameters
- 4.2.1 Carrier Frequency
- 4.2.2 Baudrate
- 4.2.3 Deviation
- 4.2.4 Interfacing mode
- 4.2.5 Watchdog
- 4.2.6 Transmission timeout
- 4.2.7 Detection method
- 4.2.8 Frequency detection time
- 4.2.9 Output voltage freeze
- 4.2.10 Output clock
- 4.2.11 Header recognition
- 4.2.12 Frame length count
- 4.2.13 Header length
- 4.2.14 Extended control register
- 4.2.15 Sensitivity mode
- 4.2.16 Pre-filter
ST7540 Power Line Modem Demokit Graphical User Interface (GUI) Introduction The "ST7538/40 FSK Power Line Modem Demo Kit" is a software tool that allows interfacing one or more ST Power Line Modem (PLM) Demo Boards with a Personal Computer. Only PLM Demo Boards equipped with ST7538 and ST7540 devices are supported. The typical Application Environment consists of a PC that communicates, through a ST7 microcontroller placed on a general purpose board called "EVALCOMMBOARD" (see Section 1.5), with a Power Line Modem Board equipped with ST7538 or ST7540 products as shown in Figure . The interface used to communicate between the PC and the EVALCOMMBOARD is the RS-232 (USB interface will be supported in future). At start-up, the Software recognizes automatically which type of device is connected to PC and modifies its appearance differently for the ST7538 or the ST7540. This document describes the ST7540 operating mode (see Section 1.5). A schematic of the application environment With the "ST7538/40 FSK Power Line Modem Demo Kit" it is possible to:
- Write/read ST7540 (or ST7538) Control Register
- Open a Tx session
- Open a Rx session
- Open a Ping session (minimum two devices required) PERSONAL COMPUTER ST7538/40 DEMOKIT CTRL REGISTER PROGRAMMING RX SESSION TX SESSION PING SESSION ST7538 or ST7540 ST7 µC MAINS EVALCOMMBOARD EVALST7538DUAL or EVALST7540-1 GUI RS-232 or USB
Installation information UM0239
1 Installation information
1.1 Software license agreement
- Important Before loading this software you have to carefully read and agree to the following terms and conditions which will be then automatically agreed on by loading this Software or any portion thereof. If you do not agree to the terms of this Agreement, do not install or use anyhow this software or any portion thereof. 2. License grant ST grants you a non-exclusive, royalty-free, worldwide license to this software written for ST products (“Software”). Y ou shall have the right to use, copy, modify and distribute the Software with ST products only. All ST Software will be required to contain the ST Copyright notice which shall not be removed therefrom for any reason. Y ou acknowledge that the Software is not designed nor is authorized for use in life supporting devices or systems. 3. Ownership and copyright of software Title to the Software and all copies thereof remain with ST. The Software is copyrighted and protected by worldwide copyright laws and international treaty provisions. Except as expressly provided herein, ST does not grant any express or implied right to you under ST patents, copyrights, trademarks, or trade secret information. 4. Warranties and liabilities ST makes no warranty express or implied including but not limited to, any warranty of (i) merchantability or fitness for a particular purpose and/or (ii) requirements, for a particular purpose in relation to the Software which is provided ON AN "AS IS" BASIS. All warranties, conditions or other terms implied by law are excluded to the fullest extent permitted by law. ST shall not be liable for any claim made by you and/or against you by a third party, in relation to the Software under this Agreement. Y ou take responsibility for the suitability, selection, use and management of the Software and the results obtained there from as well as their combination and the combination of the elements thereof with other apparatus, equipment, products, programs and services. Nothing contained in these terms shall be construed as a warranty or representation by ST as to the validity or scope of any and all IPR in respect of which a license is herein granted or constitutes a warranty or representation that any manufacture, use or sale by you hereunder shall be free from infringement of any Intellectual Property Rights (IPR) other than those under which and to the extent to which rights thereto are granted hereunder or constitute an agreement to bring or prosecute actions or suits against third parties for infringements or confer any right upon a party to use in advertising, publicity or other medium, any name trademark or trade name or any other contraction abbreviation or simulation thereto of the other party or confer by implication estoppel or otherwise upon you any license or other right under any and all IPR except the licenses and rights expressly granted hereunder to you. In no event shall ST be liable for any damages whatsoever (including, without limitation, damages for loss of business revenue or profits, business interruption, loss of business information or other pecuniary loss) arising out of the use of or the inability to use the Software as part of an ST application. ST does not assume any responsibility for any errors that may appear in the Software nor any responsibility to support or update the Software. ST
UM0239 Installation information retains the right to make changes to the Software and its test specifications at any time, without notice. 5. Entire agreement This Agreement constitutes the entire agreement with ST and supersedes any prior or contemporaneous oral or written agreements with respect to the subject matter of this Agreement. 6. Support Under this Agreement, ST is under no obligation to assist in the use of the Software, to provide you support of the Software, or to provide maintenance, correction, modification, enhancement, or upgrades to the Software. Any action taken by ST in this respect will be unilaterally taken and subject only to ST assessment - without any notice to you. Any such action shall be considered as Software and will automatically be subject to this Agreement. 7. Termination of this license ST is entitled to terminate this Software License Agreement at any time if you are in breach of any of the terms of this Agreement. Upon termination, you will immediately destroy the Software. 8. Export regulations Y ou undertake to comply with all applicable laws, regulations, decrees and ordinances related to your use of the Software. 9. Applicable laws Any dispute arising out of or in connection with this Agreement which could not be amicably settled shall be finally settled under the Rules of Conciliation and Arbitration of the international Chamber of Commerce by one or more arbitrators appointed in accordance with the said Rules which the Parties know and elect irrevocably. Such arbitration shall take place in Paris and be held in English.
1.2 System requirements
A Personal Computer (PC) including:
- one or more RS-232 serial ports
- a CD-ROM reader
- a Hard Disk with at least 20 MBytes of free space
- Screen resolution 800x600 or higher
- Operating System Windows NT/2000/XP
- Adobe Acrobat Reader release 4.0 or more recent
1.3 Installing the software
To install the software: 1. Insert the ST7538/40 Demo Board CD-ROM in your PC and execute the setup.exe file. 2. Follow the instructions displayed by the application wizard. To run the software: 1. Execute the ST7538/40 PLM Demo Kit program (Start → Programs → ST7538_40 FSK PowerLine Modem Demo Kit → ST7538_40 FSK PowerLine Modem Demo Kit).
Installation information UM0239
1.4 Release information and boards supported
This document refers to Release 3.19 of the "ST7538/40 FSK PowerLine Modem Demo Kit". The following Evaluation Boards are supported by the "ST7538/40 FSK PowerLine Modem Demo Kit":
- ST7538 Evaluation Board rev. 2.1 & rev. 2.2
- EVALCOMMBOARD rev. 1.1 + EVALST7538DUAL rev. 3.1 Dual Channel
- EVALCOMMBOARD rev. 1.1 + EVALST7540-1 rev. 2.1
1.5 Reference documents
For more information about the EVALCOMMBOARD please refer to "UM0240 User Manual Industrial Communication Board - EVALCOMMBOARD" For ST7538 working mode, please refer to "UM0241 User Manual ST7538 Power Line Modem Demokit GUI".
2 Commonly used terms
Table 1. Commonly used terms by polynomial encoding of digital signals. Mains The electrical network that supplies homes and businesses with power.
3 User interface
Figure 1. Main window The following sections provide a complete description for each component.
3.1 Menu bar
- Select the COM port for communication with the Demo Board
- Modify the size of the Toolbar
- Save the last configuration used when exiting the program (GUI)
- View help and information about this Software and ST7538 and ST7540 devices
- Exit the program MENU BAR TOOLBAR STATUS BAR PROGRAM SECTIONS:
3.2 Toolbar
- Receiving session
- Transmission session
- Control Register access
- Ping session
Figure 2. Toolbar controls Section 4.1: Selecting the COM port on page 13. Table 2. Menu bar commands
- Settings saved refer to all controls present in the “ST7538/40 FSK PowerLine Modem Demo Kit” tool.
3.3 Status bar
Figure 3. ST7540 status bar
4 Getting started
4.1 Selecting the COM port
able to access the other GUI sections. Figure 4. COM selection EVALCOMMBOARD). The status bar also displays this data as shown in Figure 3. program behavior (see Note 1). selection, the user can access all GUI sections.
Figure 5. Device selection and communication error during COM selection link status LED is present on the Status Bar as shown in Figure 3.
4.2 Setting the Control Register parameters
window then displays the Control Register dialog box as shown in Figure 6. Figure 6. Control Register window This dialog box enables the user to modify the Control Register parameters. Section 4.2.14: Extended control register on page 19.
- WR Control Register String
Figure 7. ST7540 Control Register parameters Note: Default values listed in this section refer to the ST7540 Power Line Transceiver.
4.2.1 Carrier Frequency
transmitted or received across the mains. Table 3. Summary of Control Register parameters
- Available only when Extend ed Control Register is enabled.
5 Deviation 19 Frame Length Count (1)
6 Watchdog 20 Header Length (1)
11 Not used 23 Pre-filter
14 Mains Interfacing Mode 47:40 Frame Length (1)
4.2.2 Baudrate
The Baudrate parameter (Bits [4:3]) defines the speed of communication.
4.2.3 Deviation
space frequency. When set to “0.5”, the difference is one-half the Baud Rate value. Otherwise, the difference is the Baud Rate value itself.
4.2.4 Interfacing mode
mode) or by the host (Asynchronous mode). are sent directly from the demodulator to the RxD line in Reception mode. In the current software/firmware release, only Synchronous interfacing mode is available. perform any other action (except CR reading). Table 4. Carrier frequency Table 5. Baudrate Table 6. Deviation Table 7. Mains interfacing mode
0 Synchronous
1 Asynchronous (default)
4.2.5 Watchdog
by applying a negative pulse on pin WD.
4.2.6 Transmission timeout
the device is set in RX mode.
4.2.7 Detection method
Table 8. Watchdog
0 Disabled
Table 9. Transmission timeout
00 Disabled 10 3
Table 10. Detection method
00 Preamble detection without
01 Preamble detection with
4.2.8 Frequency detection time
selected, the CD/PD becomes active only if also a preamble is detected. For more information, see Section 4.2.7: Detection method.
4.2.9 Output voltage freeze
condition until the end of transmission.
4.2.10 Output clock
multiple of the 16-MHz oscillator frequency or disables the output clock.
4.2.11 Header recognition
depending on Frame Length Count (bit 19). Table 11. Frequency detection time Table 12. Output voltage freeze
1 Disabled (default)
Table 13. Output clock
4.2.12 Frame length count
Frame Length Count parameter (Bit 19) is related to the Header Recognition function. Length parameter (Bits [47:40]).
4.2.13 Header length
the length of the header to recognize (8 or 16 bits). (Bits [39:24]) consists of 16 bits.
4.2.14 Extended control register
ST7540 (the software always transmits 48 bits when enabled). Table 14. Header recognition
0 Disabled (default)
Table 15. Frame Length Count Table 16. Header Length
4.2.15 Sensitivity mode
4.2.16 Pre-filter
The Pre-filter parameter (Bit 23) enables a pre-filter on the Reception path.
4.2.17 Frame header
depending on the Header Length value (Bit 20).
4.2.18 Frame length
This parameter (Bits [47:40]) defines the number of data, expressed in 16-bit words (e.g. Table 17. Extended control register Table 18. Sensitivity mode
0 Normal Sensitivity (500 µVrms) (default)
1 High Sensitivity (250 µVrms)
Table 19. Pre-filter Table 20. Pre-filter
4.2.19 Limitations on Cont rol Register parameters
Register parameters (hardware limitations). Table 22 lists these limitations.
4.3 Selecting the Dual Channel option
external coupling filter between two operating frequencies. the user pushes the Write Control Register button. to the selected Dual Channel frequency. Table 21. Frame length Table 22. Limitations on control register parameters a. PLM Eval Boards that support the Dual Channel feat ure have the suffix "DUAL" (i.e. "EVALST7540DUAL Rev.
Figure 8. Dual channel selection panel
4.4 Monitoring events
LEDs represent events occurred during the working session. Figure 9. Events panel Table 23 lists possible events. Table 23. Summary of events
no more message boxes appear and the Link Monitor LED becomes green.
4.5 Using the Control Register String
corresponding bits of the Control Register string become red. string (Bits 47 to 24) becomes active and the extended functions are available. Figure 10. Write control register string and parameters position
4.6 Reading/Writing Control Register parameters
Figure 11. Control register writing/reading procedures Control Register string to the ST7540 PLM Demo Board. the Read Control Register dialog box shown in Figure 12. Figure 12. Read CTRL Register dialog box Header Recognition (Bit 18). Control Register dialog box.
5 Transmission sessions
Monitor dialog box shown in Figure 13. Figure 13. Transmission Monitor dialog box Two methods of transmission are available: Sequence and Continuous. that no Timeout issues occur if the message to transmit is not too long. single transmission until the transmission is interrupted by the user or by a Timeout event. Note: A maximum of 127 bytes can be transmitted to the MCU. On EVALCOMMBOARD, the orange DL4 LED is turned on when a transmission begins. When a Timeout Event occurs, the red DL2 LED is turned on. hexadecimal and ASCII format) across the Mains. Click Load File to load an ASCII or HEX text file in the textbox. Click Close to close the Transmission Monitor dialog box.
6 Receive sessions
dialog box shown in Figure 14. Figure 14. Receive Monitor dialog box respectively. To clear the Hexadecimal and ASCII textboxes, click Reset Scope. textbox displays the masked header. a header recognition when in Frame Sync mode. demodulation time is unpredictable, byte synchronization is not ensured.
level (about 83.5 dBµVrms) by selecting the Force Sens. to BU Level parameter. When enabled, the TxD line is forced to "1"; thus obtaining a lower sensitivity. Note: If synchronization software is used, Control Register Header Recognition (Bit 18) must be set to "0" in order to have a proper behavior of the RX session. For more information, see Section 4.2.11: Header recognition on page 18. Receiving data On EVALCOMMBOARD, the green DL3 LED is turned on in Receive mode. Two reception methods are available: Reception with synchronization or Reception without synchronization depending on the Frame Sync parameter setting. Click ON to start receiving data. Click Close to stop data reception. Saving data In order to save data received from the Mains in a text file (in either hexadecimal or ASCII format), click Save to File before clicking ON to start receiving incoming data. The maximum file size allowed is 64 KBytes. To stop saving data, click Stop Saving. Click Close to close the Receive Monitor dialog box.
7 Ping sessions
error correction algorithm is also included. device in the desired mode and to display the corresponding dialog box shown in Figure 15. Figure 15. Ping windows
7.1 Opening a Ping Master session
7.1.1 Ping Master parameters
Figure 16. Ping Master dialog box Table 24. Ping master parameters Master address Defines the Address (from 1 to 255) of the Master device. from 1 to Nr. of Slave Addresses. and it is updated at every new message sent.
7.1.2 Starting a Master Ping session
transmits the current status of every message transmitted to the PC. Click Ping Stop to end the ping session. Click Close to close the Ping Master dialog box. method to “Preamble detection”. 4*Max Wait Slot Nr. ms before to analyze if it is possible to transmit a packet. elapsed, the packet is transmitted even if BU or CD/PD lines are actives. Shows information about the acknowledgement of the current message sent. Last Addressed Slave represents which Slave is the recipient of message. corrected by FEC (Wrong FCS). Click Save Statistics to store collected data in a text file. Table 24. Ping master parameters (continued)
7.2 Opening a Ping Slave session
7.2.1 Ping Slave parameters
Figure 17. Ping slave window Table 25. Ping slave parameters Slave address Defines the Address (from 1 to 255) of Slave device. method to “Preamble detection”. 4*Max Wait Slot Nr. ms before to analyze if it is possible to transmit a packet. elapsed, the packet is transmitted even if BU or CD/PD lines are actives. Get statistical Data button is pressed.
7.2.2 Starting a Slave Ping session
Click Ping Start to start the ping session and enable the reception of data. Click Ping Stop to end the ping session. Click Close to close the Ping Slave dialog box.
7.3 Ping protocol
or more Slave devices. Figure 18 shows the ping message exchange format. Figure 18. Ping message format store collected data in a text file. Table 25. Ping slave parameters (continued)
When the user clicks PING START, the session begins and the Master sends a series of packets to one or more Slave devices. All the packets contain the following information:
- Preamble (0xAAAAAAAA): 4 bytes
- Header (0x9B58 for Master packets and 0xE958 for Slave packets): 2 bytes To improve reliability of communications, a FEC algorithm and one redundant byte is used for each of the following bytes of information:
- Receiver Address: 1 byte (+ 1 byte for FEC)
- Transmitter Address: 1 byte (+ 1 byte for FEC)
- Current Message number: 3 bytes (+ 3 bytes for FEC)
- Repetition (0x00,0x01,0x02 if the same message has been transmitted once, two or three times): 1 byte (+ 1 byte for FEC)
- FCS field, obtained through a calculation of 12 previous bytes: 2 bytes (+ 2 byte for FEC) The Slave detects, through the Receiver Address field, if the packet is headed for it or not. If the message is directed to it, a FCS operation is performed on 12 bytes following the preamble and the header. The result of calculation is compared with FCS field transmitted from Master. If the two values differ, an attempt of correction is executed (through FEC correction code) and a new comparison is performed. If the two FCS fields match, the message is considered OK from Slave and it is resent to the Master (inverting Master Address with Slave Address and recalculating FEC and FCS bytes). Otherwise, the message is considered KO and no response is performed. An exception occurs when Master transmits the message zero (with Message Number field 0x000000). This message is used to reset the Slave, statistical data collected and no response to Master is needed. After a packet transmission, the Master waits (for a time defined in Wait Time in Master Window) the response from Slave, and if a message headed for it is detected it performs the same "correctness detection" operation above described in order to consider the message OK or KO. Repetition function To improve the reliability of communications, it is possible to use the repetition function. In this case, if a response is not detected by Master the packet is sent again for a maximum of three times before it is definitively considered Not Acknowledged. Medium access control A Medium Access Control is also implemented (for both Master and Slave) in order to prevent two or more devices from transmitting at the same time as described in Table 24 for the Ping Master parameters and Table 25 for Ping Slave parameters. Note: For a low-level description of Ping protocol, please refer to “Power Line Modem Evaluation FW”.
7.4 Ping session flowcharts
Figure 19. Ping master loop
Figure 20. Ping slave loop
8 Communication session examples
- Communication session without Frame Synchronization
- Communication session with Software Frame Synchronization
- Communication session with ST7540 Frame Synchronization
- Ping session
8.1 Setup procedure
8.1.1 Required hardware
- Two EVALCOMMBOARD rev. 1.1 + EVALST7540-1 rev. 2.1 (76 kHz)
- One PC with two RS-232 ports
8.1.2 Hardware setup
The setup of the communication sessions is common for all tests.
- Connect the PLM Demo Boards to the EVALCOMMBOARDs.
- Connect the boards to the two RS-232 PC ports through the serial cables to the PC.
- Link the PLM Boards to an isolated 110/220V~ Mains voltage.
- Finally, reset the two EVALCOMMBOARDs by pressing the Reset button.
8.1.3 Software setup
- Open Start, Programs, ST7538_40 FSK Power Line Modem Demo Kit and click
ST7538_40 FSK Power Line Modem Demo Kit.
- Then, select the correspondent COM available for every session (in this example
communicate with each EVAL Board. Figure 21. Communicati on setup: COM selection
COM port, SW/FW revisions and the Link status.
- Click REG on the toolbar to open the Control Register dialog box.
- Ensure that the Dual Channel feature is disabled.
- Because only few bits change for the sessions in respect to the default Control Register
parameters, click Read CTRL Register and then Update CTRL Panel.
- Set the Carrier Frequency to 72 kHz and the Detection Method to Preamble to
Now, the two Control Register dialog boxes should appear as shown in Figure 22. Figure 22. Control Register dialog boxes after setup
8.2 Communication session wi thout Frame Synchronization
- Click Rx on toolbar to open the Rx Monitor dialog box.
- Click Tx on toolbar to open the Tx Monitor dialog box.
- Write the preamble "AAAAAAAA" in the hexadecimal textbox.
8.3 Communication session with Frame Synchronization
0101-1000") are sent to the PC.
- Click Rx on toolbar to open the Rx Monitor dialog box.
- Write "9B58" in Header textbox and "FFFF" in Mask textbox.
- Click Tx on toolbar to open the Tx Monitor dialog box.
- Write the preamble "AAAAAAAA" in the hexadecimal textbox.
- Add the header "9B58" in the hexadecimal textbox.
- Add the text string "transmission with SW synchronization" (length = 36 bytes) in the
- Select Sequence Mode and set Nr. to “5”.
Five messages are transmitted. always arrive synchronized to the PC as shown in Figure 25. Figure 25. Communication with Frame Synchronization example
Communication session examples UM0239
8.4 Communication session with Hardware Frame
In this example, the board connected to COM1 is used as the Transmitter while the board connected to COM3 is the Receiver. Five messages are transmitted across the Mains and the receiving method is synchronized by ST7540 through the Header Recognition function of the Control Register. This enables incoming data from the ST7540 to arrive already synchronized to EVALCOMMBOARD and are directly sent to the PC. Actions to perform on GUI connected with COM3: 1. Click REG on toolbar to open the Control Register parameter dialog box. –E n a b l e Extended Register. –E n a b l e Header Recognition. –E n a b l e Frame Length Count. –S e t Header Length Control to "16 bits". –S e t Frame Header Control to "9B58" (hexadecimal value). –S e t Frame Length Control to "14" (hexadecimal value equal to twenty 16-bit words or 40 bytes). – Click Write CTRL Register. 2. Click Rx on toolbar to open the Rx Monitor dialog box. –S e t Frame Sync to OFF . –S e t Force Sens. to BU Level to OFF . – Click ON. Actions to perform on GUI connected with COM1: 1. Click Tx on toolbar to open the Tx Monitor dialog box. 2. Write the preamble "AAAAAAAA" in the hexadecimal textbox. 3. Add the header "9B58" in the hexadecimal textbox. 4. Add the text string "transmission with ST7540 synchronization" (length = 40 bytes) in the ASCII textbox. 5. Select Sequence Mode and set Nr. to “5”. 6. Click ON. Five messages are transmitted. Using the Hardware Frame Synchronization feature, the user ensures that the transmitted bytes always arrive synchronized to the PC as shown in Figure 26.
Figure 26. Communication with Hardware Frame Synchronization
8.5 Ping session
(as for Master as for Slave) are saved in two text files.
- Click PING on toolbar to open the Ping dialog box.
- Select Slave and click OK.
- Set Slave Address to "1".
- Write "Ping session nr. 1" in Slave Description field.
- Set Medium Access Control to "PD", Max Wait Slot Nr. to "10" and Max Wait Time
- Click PING on toolbar to open the Ping dialog box.
- Select Master and click OK.
- Set Master Address and Nr. of Slave Addresses to "1".
- Set Nr. of Messages to "100" and Repetition Control to "3".
- Set Wait Time [ms] to "255".
- Set Medium Access Control to "PD", Max Wait Slot Nr. to "10" and Max Wait Time
- Click Ping Start to start the ping session.
9 Revision history
Table 26. Revision history