文档库 最新最全的文档下载
当前位置:文档库 › AVR2028

AVR2028

AVR2028: AT86RF212 – Software Programming

Model

Features

? AT86RF212 – programming reference

? Message Sequence Charts with code examples

1 Introduction

The AT86RF212 Software Programming Model (SWPM) shall provide a reference for developers utilizing the radio transceiver AT86RF212 as effective as possible. The model describes the behavior of the radio transceiver and the required programming steps to use the provided hardware features as shown in Figure 1-1. The SWPM is targeted to software developers, who are going to develop low-level drivers for network stacks and network applications, using the AT86RF212 radio transceiver directly. The SWPM describes the hardware usage together with the related timing constraints usually handled by higher layers like IEEE802.15.4?MAC or a ZigBee ? network layer.

8-bit

Microcontrollers

Application Note

Rev. 8225A-AVR-03/09

2

AVR2028

8225A-AVR-03/09

Figure 1-1. MSC and example for PHY_STATE_RESET procedure.

2 Functional & usage description

The SWPM is primarily a collection of message sequence charts (MSC) that are used to illustrate the behavior and the usage of the AT86RF212 transceiver. Message sequence charts are a method to describe and visualize message handling between different entities. They show events, transactions and the timing relations between them.

The SWPM can serve developers as a reference manual for the daily work with the AT86RF212 transceiver. The SWPM is delivered in HTML format. The HTML files contain a detailed verbal description as well as a graphical representation of the message sequence charts. In addition to the message sequence charts there are basic code examples as illustration of a possible implementation of this specific MSC in a real programming language. The language that is used for these examples is C. The main user interface to the SWPM is the file index.html as shown in Figure 2-1.

AVR2028

3

8225A-AVR-03/09

Figure 2-1. AT86RF212 SWPM 1.0 – introduction page

The navigation is very easy by using the navigation pane on the left side. There are eight different main categories under the Software Programming Model entry shown in Table 2-1.

Table 2-1. AT86RF212 SWPM Categories

Category name Category description/Summary

Introduction SPI description, registers & sub-registers, basic description of MSCs, radio states

Setup

Init, Reset, State machine reset, current channel, transmit power

Radio Transceiver Configuration Transceiver configuration (Channel, TX Power, Sensitivity, Address Filter)

Interrupts Description of the different interrupts and their handling State Changes

Description of the transceiver state transitions RSSI, LQI, ED and CCA Measurement. Measurements of different radio relevant parameters Basic Operation Mode Standard TX and RX modes

Extended Operation Mode Configuration and usage of the extended TX and RX modes Extended features

Security Module (AES), high data rates, antenna diversity, custom SFD, RNG, advanced buffer features

4

AVR2028

8225A-AVR-03/09

All timings given in the SWPM are based on the typical timing values from the AT86RF212 datasheet. Note that the actual timings partially depend on external

circuitry and thus might be different for a particular hardware setup. For example, all power-up times depend on external capacitors connected to the voltage regulators. The message sequence charts provide a simplified programming model, which features neither loops nor branches. Therefore, all wait times are specified as a worst-case scenario, taking into account frame transmissions of the largest possible frames, exhausting the maximal number of retries etc. Usually, an actual

implementation is not going to wait for a long time in many situations, but it rather will either use interrupts to get notified about the completion status of some operation, or poll the transceiver to identify whether the operation has yielded the desired effect. Thus, the given C code examples are not meant to be an actual full implementation, they are merely provided to illustrate the case.

Further information can be found in the file readme.html in the top-level folder of the ZIP package.

8225A-AVR-03/09

Headquarters International

Atmel Corporation 2325 Orchard Parkway San Jose, CA 95131 USA

Tel: 1(408) 441-0311 Fax: 1(408) 487-2600

Atmel Asia

Unit 1-5 & 16, 19/F

BEA Tower, Millennium City 5418 Kwun Tong Road Kwun Tong, Kowloon Hong Kong

Tel: (852) 2245-6100 Fax: (852) 2722-1369

Product Contact

Atmel Europe Le Krebs

8, Rue Jean-Pierre Timbaud BP 309

78054 Saint-Quentin-en-Yvelines Cedex France

Tel: (33) 1-30-60-70-00 Fax: (33) 1-30-60-71-11

Atmel Japan

9F, Tonetsu Shinkawa Bldg. 1-24-8 Shinkawa

Chuo-ku, Tokyo 104-0033 Japan

Tel: (81) 3-3523-3551 Fax: (81) 3-3523-7581

Web Site

h ttp://https://www.wendangku.net/doc/458857183.html,/

Technical Support a vr@https://www.wendangku.net/doc/458857183.html,

Sales Contact

w https://www.wendangku.net/doc/458857183.html,/contacts

Literature Request

w https://www.wendangku.net/doc/458857183.html,/literature

Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN ATMEL’S TERMS AND CONDITIONS OF SALE LOCATED ON ATMEL’S WEB SITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and product descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel’s products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.

? 2009 Atmel Corporation. All rights reserved . Atmel?, Atmel logo and combinations thereof, AVR ? and others, are registered trademarks

or trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others.

相关文档