Free Star Pro Series ZFSM-201-KIT-1 Wireless UART Application User Guide ZFSM-201-1 FreeStar Pro Module Document # 0006-00-08-06-000 (Rev A)
Table of Contents 1 OVERVIEW... 2 1.1 DESCRIPTION... 2 2 COMMUNICATIONS SETUP... 3 2.1 VIRTUAL SERIAL PORT SETUP... 3 2.2 HYPERTERMINAL SETTINGS... 5 2.3 VERIFY COM SETTINGS... 8 3 CONFIGURATION OPTIONS... 8 3.1 ENTER CONFIGURATION MODE IN HYPERTERMINAL... 8 3.2 CONFIG MENU OPTIONS... 9 3.3 CONFIGURATION WITH A HOST MICROPROCESSOR... 10 3.4 BUTTON PRESS OVERVIEW... 11 4 DEMONSTRATIONS... 12 4.1 HYPERTERMINAL TO HYPERTERMINAL... 12 5 TROUBLESHOOTING... 13 6 ERRATA... 13 7 REVISION HISTORY... 13 1 OVERVIEW 1.1 Description The Wireless UART application is based on the IEEE 802.15.4 MAC Codebase for the MC1322x platform. The application is designed to easily configure settings, demonstrate, and is ready to use for cable replacement applications. This document describes: How to change configuration options in a HyperTerminal session. How to change configuration options via a host microprocessor. How to demonstrate the Wireless UART application in HyperTerminal. Rev A 0006-00-08-06-000 Page 2 of 13
2 COMMUNICATIONS SETUP FreeStar Pro Wireless UART User Guide 2.1 Virtual Serial Port Setup 1) Attach a USB cable (supplied) between the ZFSM-201-EVB-1 and the PC. Note: It is strongly recommended that the USB cable be plugged directly into the PC and not through a USB Hub to avoid COM port conflicts. The first time a ZFSM-201-EVB-1FreeStar Pro Evaluation Board is connected to a computer, the PC will install virtual serial port drivers and a COM port number will be assigned to the evaluation board. To check which COM port is assigned to the USB connection follow steps 2) through 5): 2) Open the Windows System Properties window using Start -> Control Panel -> System or right click on My Computer in the Start menu and select Properties from the drop down menu. 3) In the System Properties window under the Hardware tab, click the Device Manager button as indicated in Figure 1. Figure 1 Screen, Windows System Properties Rev A 0006-00-08-06-000 Page 3 of 13
Figure 2 Screen, Device Manager 4) Click on the Ports (COM & LPT) label or expand the tree by clicking the + sign. The COM ports in the system will be displayed as shown in Figure 2. 5) As shown in Figure 2, the COM port chosen by the system is displayed as USB Serial Port (COM7). Only COM ports 1-16 should be used with the FreeStar Pro Test Tool. If a COM port greater than 16 has been selected by the system follow steps 6) through 8): 6) Double click on the USB Serial Port in the Device Manager window shown in Figure 2. 7) The window shown in Figure 3 will appear. Select the Port Settings tab and click the Advanced button. Figure 3 Screen, Device Manager Port Settings Rev A 0006-00-08-06-000 Page 4 of 13
Figure 4 Screen, Device Manager COM Port Setting 8) Click the COM Port Number drop down menu and select a COM Port (not in use) between 1 and 16 as shown in Figure 4. Note: if all COM Ports between 1 and 16 show as (in use) and in actuality one of them is not being used, it can be assigned. 2.2 HyperTerminal Settings 1) Open HyperTerminal in Windows by using Start All Programs Accessories Communications HyperTerminal 2) Enter a name for the connection in the area shown in Figure 5 and click the OK button. Figure 5: HyperTerminal Connection Description 3) As shown in Figure 6 select the COM port of the FreeStar Pro Interface Board in the Connect using: drop down menu and click the OK button. Rev A 0006-00-08-06-000 Page 5 of 13
Figure 6: HyperTerminal Connect To Dialog 4) As shown in Figure 7 configure the corresponding COM port as follows and click the OK button. a. Bits per second: 19200 b. Data bits: 8 c. Parity: None d. Stop bits: 1 e. Flow Control: Hardware Figure 7: HyperTerminal COM Properties Dialog 5) In HyperTerminal navigate to the ASCII Setup File Properties Settings Tab and click the ASCII Setup button, shown in Figure 8. Rev A 0006-00-08-06-000 Page 6 of 13
Figure 8: HyperTerminal Connection Properties 6) In the ASCII Setup window, confirm that both checkboxes are checked under the ASCII Sending heading, as shown in Figure 9, and click the OK button. Figure 9: HyperTerminal ASCII Setup Dialog 7) Click the OK button in the Connection Properties window and you should return to the HyperTerminal application. Rev A 0006-00-08-06-000 Page 7 of 13
2.3 Verify COM Settings Using the status bar in HyperTerminal confirm that everything is Connected and the communications settings are displayed as 19200 8-N-1 as shown in Figure 10. Figure 10: HyperTerminal Screenshot (Connected) 3 Configuration Options 3.1 Enter Configuration Mode in HyperTerminal 1) Enter +++ (minus the quotes) in the HyperTerminal window as shown in Figure 11. Figure 11: HyperTerminal Screenshot Rev A 0006-00-08-06-000 Page 8 of 13
2) The configuration settings and Config Menu can be seen in Figure 12. Note: All configuration settings are stored in NVM and therefore retained on loss of power. Figure 12: HyperTerminal Screenshot (Config Menu) 3.2 Config Menu Options COMMAND COMMAND NAME DESCRIPTION 1 Change Channel Change the RF Channel (11 26) 2 3 Chare Output Power Change BAUD Rate Change the RF Power (0 15) Change the BAUD rate on the UART Note: HyperTerminal will have to be restarted with the new BAUD rate. 4 Change PAN-ID Change the PAN-ID of the Network (1 65530) 5 6 7 8 Change Device Address Change Destination Address Change Number of RF Retries Change Inter Char Delay Change the device s address Change the address of the target device If set to 0 RF Retries are disabled. If set to 1-3 the transmitting device will retry the RF message 1-3 times (based on selection) if no RF acknowledgement to the first message is received. The inter-character delay is the time no data is received on the UART before sending data over-the-air. Note: If typing in a terminal program, this setting would typically be in the range of 500 ms. Rev A 0006-00-08-06-000 Page 9 of 13
COMMAND COMMAND NAME FreeStar Pro Wireless UART User Guide DESCRIPTION 9 Change Quiet Period The quiet period is the time no data is received on the UART before the firmware allows for configuration changes. If the quiet period is not met, any +++ sequence would be treated as data to send over-the-air. Note: If typing in a terminal program, this setting would typically be in the range of 1000 ms. q Quit/Exit Config Quit Configuration and run Wireless UART application e d Enable Terminal Configuration & Messages Disable Terminal Configuration & Messages If enabled the device will print ASCII menus and status information (see command d ) Note: Only use if demonstrating in HyperTerminal. In an actual cable replacement application this menu system should be disabled. Disables the ASCII menus and status information (see command e ) Table 1: Config Menu Options Note: Adjusting the Inter-Char delay is important to keeping the data transfer over the air (OTA) efficient. Efficiency is achieved by loading as much data into a packet as possible, since the IEEE 802.15.4 packet contains overhead in every packet for addressing, pan-id s, etc. 3.3 Configuration with a Host microprocessor A host microprocessor could be used to configure the application over the UART. The Wireless UART software times how long it takes between +++ characters. If they arrive in less than 4 ms (an order of magnitude faster than anyone can type) the software will automatically disable terminal messages and respond to commands with ASCII SUCCESS or messages. All commands are ASCII based, just as in HyperTerminal. Do not confuse a hexadecimal 0x01 with ASCII 1 - which is 0x31 in hex. All configuration changes must start with +++ command. Host Command (ASCII) Response (ASCII) Notes +++ Enter configuration mode if SUCCESS Table 2: +++ Command Details Change the appropriate configuration option by sending a 1 9 or e, d and the corresponding parameter. For example 1 to change channel followed by 11 for channel 11. Think of the Host microprocessor just replacing the PC keyboard, for more information the commands please refer to Table 1. All configuration changes must end with q command which saves the changed commands to non-volatile memory. Rev A 0006-00-08-06-000 Page 10 of 13
Host Command (ASCII) Host Command Parameter ( ASCII) Response Notes 1 11-26 2 0-15 3 1-8 4 1-65530 5 1-65535 6 1-65535 7 0-3 8 0-3000 9 1-3000 q e d q Change the RF Channel Change the RF Power Change BAUD Rate 1 = 1200, 2 = 2400, 3 = 4800, 4 = 9600, 5 = 19200, 6 = 38400, 7= 57600, 8 = 115200 bps Change the PAN-ID of the Network Change the device s address Change the address of the target device Change the number of RF retries Change the Inter Char Delay (ms) Change the Quiet Period (ms) Quit configuration and run wireless UART application. Enable terminal messages Disable terminal messages Exit and Run Wireless UART Table 3: Microcontroller Host Commands 3.4 Button Press Overview A long button press (over one second) within 5s of reset will configure the software to switch applications. Any long button press will be acknowledged with a corresponding LED turning on. A long button press (over one second) within 5s of reset will preset the device to the following: Rev A 0006-00-08-06-000 Page 11 of 13
SW1 SW2 SW3 Run Wireless UART application with the following settings: Run Wireless UART application with the following settings: Run Wireless UART application with the following settings: RF Retries = 1 Inter Char delay = 20 Address = 1010 Destination Address = 2020 Channel = 15 Pan-ID = 44,444 Disable Terminal Messages RF Retries = 1 Inter Char delay = 20 Address = 2020 Destination Address = 1010 Channel = 15 Pan-ID = 44,444 Disable Terminal Messages Table 4: Button Press Configuration Enable Terminal Messages 4 Demonstrations 4.1 HyperTerminal to HyperTerminal 1) Connect two boards to a PC and open two sessions of HyperTerminal as shown in Figure 13. Figure 13: HyperTerminal to HyperTerminal 2) Board #1: Press SW1 for one second within 5s of reset to preset configuration. 3) Board #2: Press SW2 for one second within 5s of reset to preset configuration. 4) Begin typing on either terminal and the data will be displayed on the other terminal as shown in Figure 14. 5) Changes to configurations can be made as described in the above sections of this manual. Rev A 0006-00-08-06-000 Page 12 of 13
Figure 14: HyperTerminal to HyperTerminal (Screenshots) 5 Troubleshooting If the boards fail to communicate try the following: 1) Use terminal program to check settings. See above sections about displaying the configuration settings in HyperTerminal. A) Ensure the Channel, PAN-ID, Source and Destination Addresses match. B) Ensure the UART baud rates match. 2) Use LED s A) LED1 Flashes when transmitting RF B) LED2 Flashes when receiving RF C) LED3 Flashes when transmitting UART data D) LED4 Flashes when receiving UART data 3) Switch RF channels. Perhaps the boards are not communicating due to RF interference or heavy network traffic. 6 Errata 1) The BAUD rate is not adjustable. The problem resides with the Freescale API that is slated to be fixed in a later version of the MAC codebase. 7 Revision History Revision Date Description A 04Feb09 Released Rev A 0006-00-08-06-000 Page 13 of 13