NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
NA-05-0131-0344-1 - Datasheet Archive
nanoNET Wireless Nodes Application Note Version 1.00 NA-05-0131-0344-1.00 Keywords nanoNET TRX transceiver, Real Time Clock, time
Time Synchronization of nanoNET Wireless Nodes Application Note Version 1.00 NA-05-0131-0344-1 NA-05-0131-0344-1.00 Keywords nanoNET TRX transceiver, Real Time Clock, time beacon frame, time master, time synchronization Document Information Time Synchronization of nanoNET Wireless Nodes Document Information Document Title: Time Synchronization of nanoNET Wireless Nodes Document Version: 1.00 Released (yyyy-mm-dd): 2005-08-17 Current Printing: 2005-8-17, 10:57 am Document ID: NA-05-0131-0344-1 NA-05-0131-0344-1.00 Document Status: Preliminary Nanotron Technologies GmbH reserves the right to make changes without further notice to the product to improve reliability, function or design. Nanotron Technologies GmbH does not assume any liability arising out of the application or use of any product or circuits described herein. in any form by any means, electronic, mechanical or optical, in whole or in part, without the prior written permission of Nanotron Technologies GmbH. Copyright © 2005 Nanotron Technologies GmbH. Nanotron Technologies GmbH Alt-Moabit 61 10555 Berlin, Germany This document and the information contained herein is the subject of copyright and intellectual property rights under international convention. All rights reserved. No part of this document may be reproduced, stored in a retrieval system, or transmitted Tel: +49 (0) 30 - 399 954 - 0 Fax: +49 (0) 30 - 399 954 - 188 Email: sales@nanotron.com Internet: www.nanotron.com Page ii NA-05-0131-0344-1 NA-05-0131-0344-1.00 © 2005 Nanotron Technologies GmbH. Introduction Time Synchronization of nanoNET Wireless Nodes 1 Abstract The nanoNET TRX transceiver includes Real Time Clock (RTC) circuitry with a time resolution of 30.5 µs. It is possible to synchronize two or more wireless nodes at this resolution. C-code fragments are provided which demonstrate how to control this synchronization with software. 1 Introduction The nanoNET TRX transceiver, utilizing a new modulation technique Chirp Spread Spectrum (CSS) developed by Nanotron, is a highly integrated mixed-signal chip intended for wireless communication in the 2.44 GHz ISM band.1 Chirps are signals with frequencies that are linearly increasing or decreasing2. The Real Time Clock (RTC) circuitry, which is a part of a digital block of the transceiver, has the following uses: As a timer for a wake-up circuitry To generate time interrupt signal To provide a time stamp for time synchronization of network nodes via time beacon MACFrames. Time synchronization among nodes is necessary for Time Division Multiple Access (TDMA). 1.1 The Real Time Clock (RTC) The RTC uses an oscillator with the frequency 32.768 kHz typically having the accuracy of 30 ppm. Hence, the speed of clock drift of two stations having the same temperature can reach up to 60 µs per second. The RTC is implemented in the form of a 48 bit counter. The latter is increased by one roughly every 30.5 µs. 1.2 Time Synchronization of Two Nodes Type Code 1 7 4 4 48 Source Address Frame Control Encryption Control RTC Timestamp Length Reserved Scrambler Init Two stations are synchronized by the exchange of a timestamp, which is the current value of the RTC counter. This counter is embedded in a time beacon MAC frame as shown below. CRC1 48 13 3 16 Data 1 . CRC2 16/32 NOTE: The figures below fragments of the frame stay for the length in bits of the particular fragment. Figure 1: The nanoNET Time Beacon MAC frame format A time beacon packet is a special form of a broadcast packet, and like every broadcast packet, it includes a payload part of the frame. A "time master" station transmits a time beacon message to all stations within its range so that these stations can be simultaneously synchronized to the master. A time beacon frame conveys the full length of the RTC counter; that is, a slave node can be synchronized with the precision of at least 30.5 µs to the time master, irrespective of the kind of a deployed microcontroller. 1. For more information, refer to nanoNET TRX (NA1TR8) Transceiver Datasheet. 2. For more information, refer to nanoNET TRX PHY and MAC System Specifications. © 2005 Nanotron Technologies GmbH. NA-05-0131-0344-1 NA-05-0131-0344-1.00 Page 1 2 References Time Synchronization of nanoNET Wireless Nodes The transceiver provides the following procedures for time beacons: 1. Inserting the timestamp into the time beacon MACFrame. 2. Transmitting the time beacon. 3. Receiving the time beacon. 4. Extracting the timestamp from the time beacon. Note: This feature is supported only if the Auto Baseband Mode is active. 1.3 Setting Up the Time Master and Clients To set up time synchronization on the Time Master, do the following: Note: Begin here if a new start value of the RTC counter is required: 1. Write into the baseband RAM (BBRAM) a new start value of the RTC counter, if required. 2. Set the new value into the RTC circuitry using the RtcCmdWr register bit. Note: Begin here if no new RTC counter value is required. 3. Set the RtcTimeBAutoMode register bit to 1. 4. Write the time beacon packet type (0x02) into the TxPacketType register. 5. Switch off Automatic Repeat Request (ARQ) by setting the TxArq register bit to 0 (no ACK). 6. Write data (at least 1 byte) into the transmit buffer. 7. Write data length into BBRAM. 8. Start the packet transmission. To set up time synchronization on the client stations, do the following: 1. Set the RtcTimeBAutoMode register bit to 1. 2. Enable the reception of time beacon packets by setting the RxTimeBEn register bit to 1. 3. Start the receiver. The notification of the arrival of a time beacon packet is equivalent to data packet notification. Also, the payload part of the time beacon packet is to be treated equally. The adoption of the new counter value by the RTC is done automatically without software assistance. 2 References [1] nanoNET TRX (NA1TR8) Transceiver Datasheet, Nanotron Technologies GmbH, Berlin, Germany, 2005 [2] nanoNET TRX (NA1TR8) Transceiver Register Description, Nanotron Technologies GmbH, Berlin, Germany, 2005 [3] nanoNET SPI (Serial Peripheral Interface) Specifications, Nanotron Technologies GmbH, Berlin, Germany, 2005 [4] nanoNET TRX PHY and MAC System Specifications, Nanotron Technologies GmbH, Berlin, Germany Page 2 NA-05-0131-0344-1 NA-05-0131-0344-1.00 © 2005 Nanotron Technologies GmbH. C-Code Example Time Synchronization of nanoNET Wireless Nodes A3 A3 C-Code Example The following code snippets focus on time synchronization specific settings. It is assumed a common nanoNET TRX initialization is done elsewhere.1 The first code snippet shows the settings used by the Time Master. Since the payload of the time beacon packet comprises at least one byte, a one byte sequence number of a time beacon will be used as an example. /* . #include #include #include #include beginning of code snippet . */ "OffstMapInit.h" /* TRX register description file */ "nnspi.h" /* declaration of routines using SPI-bus */ "shadowreg.h" /* declaration of shadow registers */ "delay.h" /* declaration of delay routines */ #define BB_seg3_O 0x380 /* start address of the TX buffer */ static unsigned char seqno = 0;/* time beacon sequence number */ unsigned char data[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; /* new value for RTC counter */ /* the following code sequence needs the 16 MHz clock distribution to be switched on */ transSPI(WRITE_CMD, Silbadero_RamRtcReg_O, data, 6); /* writes the new counter value into RTC registers */ shadow_reg[Silbadero_RtcCmdWr_O] |= (1