Information in this document is provided solely to enable system and software implementers to use
Freescale Semiconductor products. There are no express or implied copyright licenses granted
hereunder to design or fabricate any integrated circuits or integrated circuits based on the information
in this document.
Freescale Semiconductor reserves the right to make changes without further notice to any products
herein. Freescale Semiconductor makes no warranty, representation or guarantee regarding the
suitability of its products for any particular purpose, nor does Freescale Semiconductor assume any
liability arising out of the application or use of any product or circuit, and specifically disclaims any
and all liability, inclu ding without limitation consequential or incidental damages. “Typ ical” parameters
that may be provided in Freescale Semiconductor data sheets and/or specifications can and do vary
in different applications and actual performance may vary over time. All operating parameters,
including “Typicals”, must be validat ed for each customer application by customer’s technical
experts. Freescale Semiconductor does not convey any license under its patent rights nor the rights
of others. Freescale Semiconductor products are not designed, intended, or authorized for use as
components in systems intended for surgical implant into the body, or other applications intended to
support or sustain life, or for any other application in which the failure of the Freescale Semiconductor
product could create a situation where personal injury or death may occur. Should Buyer purchase
or use Freescale Semiconductor products for any such unintended or unauthorized application,
Buyer shall indemnify and hold Freescale Semiconductor and its officers, employees, subsidiaries,
affiliates, and distributors harmless against all claims, costs, damages, and expenses, and
reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death
associated with such unintended or unauthorized use, even if such claim alleges that Freescale
Semiconductor was negligent regarding the design or manufacture of the part.
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other
product or service names are the property of their respective owners.
MKW01 Simple Media Acces s Controller (SMAC), Rev. 0.0
2Freescale Semiconduct or
About This Book
This manual provides a detailed description of the Freescale MKW01 Simple Media Access Controller
(MKW01 SMAC). This software is designed for use specifically with the MKW01 platform. The MKW01
is a highly-integrated, cost-effective, system-in-package (SiP), sub-1 GHz wireless node solution with an
FSK, GFSK, MSK, or OOK modulation-capable transceiver and low-power, ARM Cortex M0+ 32-bit
microcontroller . The highly integrated RF transceiver operates over a wide frequency range including 315
MHz, 433 MHz, 470 MHz, 868 MHz, 915 MHz, 928 MHz, and 955 MHz in the license-free Industrial,
Scientific, and Medical (ISM) frequency bands.
The MKW01 SMAC software is pre-defined to operate in the 470–510 MHz , 863–870 MHz, 902–928
MHz and 920–928 MHz bands.
Audience
This document is intended for application developers working on custom wireless applications that
employ the MKW01. The latest version of the Freescale MKW01 SMAC is available in the Freescale
website.
Organization
This document is organized into four chapters and one appendix.
Chapter 1MKW01 SMAC Introduction — This chapter introduces MKW01 SMAC
features and functionality.
Chapter 2Software Architecture — This chapter describes MKW01 SMAC software
architecture.
Chapter 3Primitives — This chapter provides a detailed description of MKW01 SMAC
primitives.
Revision History
The following table summarizes revisions to this document since the previous release.
Revision History
LocationRevision
MKW01SMACRMThis is the first release of the RTOS
and KSDK enabled SMAC manual.
Conventions
This document uses the following notational conventions:
•Courier monospaced type indicate commands, command parameters, code examples,
expressions, datatypes, and directives.
•Italic type indicates replaceable command parameters.
•All source code examples are in C.
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
Freescale Semiconduc tor3
Definitions, Acronyms, and Abbreviations
The following list defines the acronyms and abbreviations used in this document.
MKW01MKW01 Platforms (FRDM-KW01, MRB-KW01, USB-KW01)
GUIGraphical User Interface
MAC Medium Access Control
MCUMicroController Unit
NVMNon-Volatile Memory
PCPersonal Computer
TERMSerial Port Terminal Application
XCVRTransceiver
PCBPrinted Circuit Board
OTAOver the air.
SAPService Access Point
ACKAcknowledge
AAAutomatic ACK
LBTListen Before Talk
RXReceive(r)
TXTransmit(ter)
CCAClear Channel Assessment
EDEnergy Detect
References
The following sources were referenced to produce this book:
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
4Freescale Semiconduct or
Chapter 1
MKW01 SMAC Introduction
The Freescale MKW01 Simple Media Access Controller (MKW01 SMAC) is a simple ANSI C based
codebase available as sample source code. The MKW01 SMAC is used for developing proprietary RF
transceiver applications using Freescale’s MKW01 sub-1 GHz transceiver plus microcontroller. The
MKW01 is a system-in-package (SIP) device that includes an ARM Cortex M0+ based microcontroller
and a sub-GHz ISM band radio front-end device in an LGA-56 package. Features of the MKW01 include:
•MCU has a 32-bit ARM Cortex M0+ CPU with a full set of peripheral functions
•MCU has 128KB flash and 16KB SRAM
•Full featured, programmable sub-1 GHz transceiver that supports FSK, GFSK, MSK, GMSK, and
OOK modulations schemes.
•The MKW01 has internal and external connections between the MCU and transceiver:
— The MCU communicates with the transceiver through an internally connected SPI port.
— Several transceiver status bits are also i nternally or ext ernally connecte d to MCU GPIO and are capable
of generating interrupt requests.
NOTE
It is highly recommended the SMAC user be familiar with the MKW01
device. Additional details can be found in the device data sheet (MKW01)
and the MKW01 Reference Manual (MKW01xxRM).
The MKW01 SMAC is a small codebase that provides simple communication and test applications based
on drivers, (802.15.4 compliant) PHY and framework utilities available as source code. This environment
is useful for hardware and RF debug, hardware standards certification, and developing proprietary
applications. The MKW01 SMAC is provided as part of the Example Application Demos available for
MKW01 and also as a standalone set of files.
To use any of the existing applications available in MKW01 SMAC, users must download and open the
available Application Demos in the corresponding development environment (IDE).
SMAC features include:
•Compact footprint:
— Between 2 to 3KB of flash required, depending on configuration used.
— Less than 500 bytes RAM, depending on configuration used.
•Very low power, proprietary, bidirectional RF communication link.
•The MKW01 radio allows checking the preamble and the synchronization word, which reduces
software overhead and memory footprint.
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
Freescale Semiconduc tor1-5
MKW01 SMAC Introduction
•Broadcast communication
•Unicast communication — MKW01 SMAC includes a Node Address 16-bit field. This allows
SMAC to perform unicast transmissions. To change the address of a node, modify this constant:
gNodeAddress_c inside the SMAC_Config.h file, or call SMACSetShortSrcAddress(uint16_t
nwShortAddress).
The address is set to 0xBEAD by default. Some of the Demo Applications
will allow the user to change this address at runtime.
•Change of current PAN. The SMAC packet uses a short 802.15.4 compliant header with a
hard-coded configuration for frame control which allows the user to switch between PANs. The
PAN address has also 16 bits (gDefaultPanID_c). This address can be modified both by changing
the default value from SMAC_Config.h file or by calling SMACSetPanID(uint16_t
nwShortPanID.
•There are no blocking functions within the MKW01 SMAC.
•Flexible enough to conf igure packet hea der (preamble siz e, synchronizati on word size, and sy nchronization
word value)
•Pre-defined settings at four different bands to initialize the SMAC protocol. The currently
supported operating frequency bands are:
•Light-weight, custom, AA mechanism which is transparent to the user after enabling the feature.
•Encryption using Advanced Encryption Standard in Cipher Block Chaining mode, with
configurable initial vector and key.
•Configurable number of retries and backoff interval.
•Inter-layer communication using SAPs.
•The MKW01 SMAC also filters packets that have correct addressing information (pass address
filtering) but are not in the expected format (short addressing, no security, data frame).
1.1MKW01 SMAC-based Demonstration Applications
The following is a list of MKW01 SMAC-based demonstration applications:
•PC-based Connectivity T est Application which requires a TERM. This application allows the user
to perform basic communication tests and several advanced XCVR tests.
•PC-based Wireless Messenger Application which requires a TERM and is presented in the form of
a messenger-like application. This demo application highlights the “Listen Before Talk” and
“Automatic ACK” mechanisms, allowing the user to enable, disable and configure them at
runtime.
•PC-based Wireless UART Application which requires either a TERM or an application capable of
reading/writing from/to a serial port. This application is used as a wireless UART bridge bet w een
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
1-6Freescale Semiconduct or
MKW01 SMAC Introduction
two or more (one to many) MKW01 platforms. It can be configured to use the previously
mentioned mechanisms, but the configuration must be done at compile time.
•PC-based Low Power Demo Application which requires a TERM. This application aids the user in
enabling low power modes on the MKW01 platforms.
1.2Platform Requirements
The SMAC can be used with any customer target application or board, however, Freescale provides several
development platform (modular reference board, freedom board and usb dongle) designs with leds,
pushbuttons and other modules included.
1.3MCU Resources Used by SMAC
As stated, the MKW01 contains an MCU and a transceiver in a single package. The SMAC does not use
MCU resources directly. All accesses to the MCU resources are performed using the framework, drivers
and PHY.
1.4SMAC Basic Initialization
Before transmitting, receiving, or performing any other SMAC operation described in this manual, the
system protocol must be initiali ze d to configure the transce iver with c o rre ct functi onal set tings and t o se t
SMAC's state machine to known states. To initialize the SMAC, perform the following tasks in order:
1. Initialize MCU interrupts and peripherals. This initialization is included in every demo in the
hardware_init(void) function, available as source code.
2. Initialize SMAC, to set the SMAC state machine to default, configure addressing with default
values, initialize the RNG used for the first sequence number value and the random backoff.
InitSmac();
3. Set the SAP handlers so that SMAC can noti fy the application on asynchronous events on both data
and management layers.
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
Freescale Semiconduc tor1-7
MKW01 SMAC Introduction
instanceId_t smacInstanceId
)
4. Reserve the RAM memory space needed by SMAC to alloca te th e rec ei ved and tran smitt ed OTA
messages by declaring the buffers that must be of the size gMaxSmacSDULength_c + sizeof(packet
type):
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
1-8Freescale Semiconduct or
Chapter 2
Software Architecture
This chapter describes the MKW01 SMAC software architecture. All of the SMAC source code is always
included in the application. SMAC is primarily a set of utility functions or building blocks that users can
use to build simple communication applications.
2.1Block Diag ram
Figure 2-1 shows a simplified MKW01 SMAC based stack block diagram.
An application programming interface (API) is imple mented in the MKW01 SMAC as a C header file (.h)
that allows access to the code. The code includes the API to specific functions. Thus, the application
interface with the SMAC is accomplished by including the SMAC_Interface.h file, which makes reference
to the required functions within the SMAC and provides the application with desired functionality.
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
Freescale Semiconduc tor2-9
Figure 2-1. SMAC System Decomposition
Software Architecture
NOTE
MKW01 SMAC projects support only the MKW01-based target boards
designated in the files.
2.2MKW01 SMAC Data Types and Structures
The MKW01 SMAC fundamental data types and defined structures are discussed in the following
sections.
2.2.1Fundamental Data Types
The following list shows the fundamental data types and the naming convention used in the MKW01
SMAC:
u8MaxDataLengthMax number of bytes to be received.
rxStatus Indicates the reception state. See rxStatus_t data type for more detail.
u8DataLength Number of received bytes.
smacPdu The MKW01 SMAC protocol data unit.
smacHeaderSMAC structure that defines the header used. Freescale recommends that the user
does not modify this structure directly, but through the associated functions.
MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0
2-10Freescale Semiconduct or
Loading...
+ 26 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.