NXP Semiconductors SMAC Reference Manual
NXP Semiconductors SMAC Reference Manual

NXP Semiconductors SMAC Reference Manual

Freescale simple media access controller for the hcs08

Advertisement

Quick Links

Simple Media Access Controller
(SMAC) for the HCS08
Reference Manual
Document Number: SMAC08RM
Rev. 2.0
03/2012

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SMAC and is the answer not in the manual?

Questions and answers

Summary of Contents for NXP Semiconductors SMAC

  • Page 1 Simple Media Access Controller (SMAC) for the HCS08 Reference Manual Document Number: SMAC08RM Rev. 2.0 03/2012...
  • Page 2 How to Reach Us: 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 Home Page: hereunder to design or fabricate any integrated circuits or integrated circuits based on the information www.freescale.com in this document.
  • Page 3: Table Of Contents

    SMAC Data Types ........
  • Page 4 MLMEWakeComfirm ........... . 3-22 Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0...
  • Page 5: About This Book

    About This Book This guide provides a detailed description of the Freescale Simple Media Access Controller (SMAC) for the HCS08 MCU based devices. This document replaces the SMAC User’s Guide currently at Rev 1.5. Audience This document is intended for application developers 802.15.4 PHY wireless applications. The latest version of the Freescale SMAC for the HCS08 is incorporated into the Freescale BeeKit Wireless Connectivity Toolkit.
  • Page 6: Definitions, Acronyms, And Abbreviations

    Over the air. References The following sources were referenced to produce this book: [1] Freescale 802.15.4 MAC/PHY Software Reference Manual (802154MPSRM) [2] Zigbee.hlp (see Test Tool installation directory.\help) Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 Freescale Semiconductor...
  • Page 7: Smac Introduction

    3. MC1323x - this device a full system on chip where the RF transceiver is integral to the IC and appears as a peripheral to the MCU bus. As a result, the SMAC applies differently as to how it communicates with and controls the transceiver, and also how communication services are provided.
  • Page 8: Features

    The SMAC is incorporated into the Freescale BeeKit Wireless Connectivity Toolkit. The incorporation of SMAC into BeeKit makes it easier for users to employ and customize SMAC. SMAC has evolved with the HCS08 platforms, and as a result, changes have occurred with later versions. The primary changes are as follows: •...
  • Page 9: Using Beekit

    For more details about running the SMAC applications refer to the SMAC for the HCS08 Demonstration Applications User’s Guide (SMAC08DAUG). To use any of the existing applications available in SMAC, users must first generate the application as a project in a BeeKit solution. For more information about BeeKit, BeeKit Projects, and BeeKit Solutions, refer to the BeeKit Wireless Connectivity Toolkit User’s Guide (BKWCTKUG) and the BeeKit on-line...
  • Page 10 MCP file is generated from the BeeKit generated XML project file. Figure 1-1 shows the folder structure of a typical project generated using SMAC Codebase for BeeKit. Figure 1-1. Example Project Folder Structure Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0...
  • Page 11: Software Architecture

    Chapter 2 Software Architecture This chapter describes the SMAC software architecture. In this version of the SMAC, all of the SMAC source code is included in the application. This represents a far less complex project that can be compiled using CodeWarrior Special Edition.
  • Page 12: Hardware Support

    This section describes the SMAC hardware support for the MCU, transceiver, antenna switch, and LNA. The SMAC can be easily ported to any MCU, as long as the system requirements are met. To port to another MCU, perform the following tasks: 1.
  • Page 13: Rxpacket_T

    Signed 16 bit definition int32_t Signed 32 bit definition These data types are used in the SMAC project as well as in the Applications projects and they are defined in the EmbeddedTypes.h file. 2.3.1 rxPacket_t This structure defines the variable to be used for SMAC receiving data buffer:...
  • Page 14: Smacpdu_T

    Members SMAC set this state when starting a reception. rxInitStatus This state is set when the SMAC is in the middle of receiving a packet. rxProcessingReceptionStatus_c This is one of the possible finish condition for a receiving packet that was rxSuccessStatus_c successfully received and could be checked at the indication functions.
  • Page 15: Txstatus_T

    Indicates the total number of possible transmission states. txMaxStatus_c 2.3.6 channels_t This structure defines the variable to be received by the SMAC and is located in the file. SMAC_Interface.h It is defined as follows: typedef enum channels_tag{ gChannel11_c = 0x0B,...
  • Page 16: Clkofrequency_T

    Constant indicates the total number of possible clock output valid selections. gClkoOutOfRange_c 2.3.8 scanModes_t This enumeration list all the scanning methods available on SMAC and is located in the SMAC_Interface.h file. It is defined as follows: typedef enum scanModes_tag{ gScanModeCCA_c,...
  • Page 17: Smacerrors_T

    Software Architecture 2.3.9 smacErrors_t This enumeration is used as the set of possible return values on most of the SMAC API functions and is located in the SMAC_Interface.h typedef enum smacErrors_tag{ gErrorNoError_c = 0, gErrorBusy_c, gErrorOutOfRange_c, gErrorNoResourcesAvailable_c, gErrorNoValidCondition_c, gErrorCorrupted_c, gErrorMaxError_c }smacErrors_t;...
  • Page 18: Timertimebase_T

    This enumeration lists all the elements (HW or SW) that have a version attached and is located in the file. SMAC_Interface.h typedef enum versionedEntity_tag{ gSwSmacVersion_c, gHwIcVersion_c, gMaxVersionedEntity_c }versionedEntity_t; Members Use this to request the SMAC version. gSwSmacVersion_c Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 Freescale Semiconductor...
  • Page 19 Software Architecture Use this to request the Transceiver/SoC version number. gHwIcVersion_c Defines the total number of versions entities. gMaxVersionedEntity_c Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 Freescale Semiconductor...
  • Page 20 Software Architecture Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 2-10 Freescale Semiconductor...
  • Page 21: Primitives

    This data primitive sends an over-the-air packet. This is an asynchronous function, which means that the function does not run in the same thread as the caller (the application). It asks SMAC to transmit a packet and returns control to the application, when transmission is completed the result of the operation is reported by the MCPSDataConfirm callback which is called in an interrupt context.
  • Page 22: Mlmelinkquality

    • The value of the link quality is valid and preserved until the next received packet. • This format does not meet IEEE 802.15.4 Standard requirement. Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 Freescale Semiconductor...
  • Page 23: Mlmerxdisablerequest

    MLMERXDisableRequest is executed. Prototype smacErrors_t MLMERXEnableRequest(rxPacket_t *, uint32_t); Arguments rxPacket_t * Location of the buffer to store the incoming data. uint32_t 32-bit timeout value. Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 Freescale Semiconductor...
  • Page 24: Mlmedozerequest

    — The total time period equals: value x (transceiver timer clock period). The timer clock period is determined by the frequency set by the MLMESetTmrPrescale function, see Section 3.1.15, “MLMESetTmrPrescale”. Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 Freescale Semiconductor...
  • Page 25 Radio is performing another action and could not attend this request. Usage To use Acoma Mode, users should call this function with “0” as parameter. Then, the SMAC sets the radio in Acoma Mode with CLKO Output MLMEWakeRequest. To exit from this state, users should call the MLMEWakeRequest function.
  • Page 26: Mlmeenergydetect

    This parameter is called POWER_COMP[7:0] on the MC13202 and MC13213 platforms. It is called CCA_OFFSET_CMP on the MC1323x platform • The default value out of reset is 0x8D Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 Freescale Semiconductor...
  • Page 27: Mlmegetchannelrequest

    If the current frequency setting does not match a standard channel setting, an error is returned as gChannelOutOfRange_c Prototype channels_t MLMEGetChannelRequest(void); Arguments None. Returns {gChannel11_c to gChannel26_c}The current RF channel.. gChannelOutOfRange_cIf current channel could not be detected. Usage Simply call MLMEGetChannelRequest(). Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 Freescale Semiconductor...
  • Page 28: Mlmehibernaterequest

    Macros MIN_POWER, MAX_POWER, and NOMINAL_POWER are also acceptable Table 3-1 shows the typical output power versus power settings for the MC13202/MC13213 families Prototype smacErrors_t MLMEPAOutputAdjust(uint8_t U8PaValue); Arguments uint8_t Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 Freescale Semiconductor...
  • Page 29: Mlmephysoftreset

    PHY and SMAC states machines. Prototype smacErrors_t MLMEPHYSoftReset(void); Arguments None Returns gErrorNoError_c If the action was performed. Usage Simply call the MLMEPHYSoftReset () function directly. Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 Freescale Semiconductor...
  • Page 30: Mlmeradioinit

    IEEE 802.15.4 Standard designations. The channel argument sets Channel 11 through Channel 26 as determined by argument value “gChannel11_c” to “gChannel26_c”. Prototype newChannel smacErrors_t MLMESetChannelRequest(channels_t Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 3-10 Freescale Semiconductor...
  • Page 31: Mlmesetclockrate

    Returns gErrorNoError_c The channel set has been performed gErrorBusy_c When SMAC is busy in other radio activity like transmitting/receiving data or performing a channel scan, among others. gErrorOutOfRange_c The requested channel is not valid Usage Simply call MLMESetChannelRequest (channel requested).
  • Page 32: Mlmesettmrprescale

    MC13202 and MC1321x primitives: #if gTargetXcvr_c == gXcvrMc1321x_c || gTargetXcvr_c == gXcvrMc1320x_c || gTargetXcvr_c == gXcvrMc1319x_c typedef enum timerTimeBase_tag gTimeBase2MHz_c = 0, gTimeBase1MHz_c, gTimeBase500kHz_c, gTimeBase250kHz_c, gTimeBase125kHz_c, Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 3-12 Freescale Semiconductor...
  • Page 33: Mlmewakerequest

    Call this function to waken the transceiver from Hibernate or Doze mode. 3.1.17 MLMEPHYXtalAdjust All the devices have a reference oscillator that can be trimmed via register setting: Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 Freescale Semiconductor 3-13...
  • Page 34: Xcvrcontreset

    This primitive can be used only on the MC1320x and MC1321x platforms. For the MC1323x platform, it is invalid. Prototype void XCVRContReset(void); Arguments None Returns Nothing Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 3-14 Freescale Semiconductor...
  • Page 35: Xcvrrestart

    Call this function to release the transceiver hardware reset. The transceiver should be re-initialized after a reset. 3.1.20 MLMEGetPromiscuousMode As standard practice SMAC allows the receiver function to filter incoming RX packets, allowing only SMAC-compatible packets to be recognized; see Section 3.1.23, “MLMESetPromiscuousMode. This mode can be turned off (i.e., promiscuous mode) and all received packets will be reported.
  • Page 36: Mlmegetrficversion

    If the requested Entity is not part of the stored ones. Usage Call this function to determine the current IC Hardware version or the SMAC Software stack version. 3.1.22 MLMEScanRequest A useful function is to be able to scan the different frequency channels and report the status of reported energy.
  • Page 37: Mlmesetpromiscuousmode

    3.1.23 MLMESetPromiscuousMode SMAC appends 0xFF7E as the first two bytes of the packet to identify its own non-standard packets from other IEE802.15.4 Standard MAC packets in the same PHY layer. When promiscuous mode is off, SMAC filters the received packets and just allows/reports those beginning with 0xFF7E; when promiscuous mode is on SMAC lets all messages pass, whether beginning with 0xFF7E or not.
  • Page 38: Mlmetestmode

    Continuous TX with modulation — CW mode that allows characterization of the TX spectral output with modulation Prototype smacErrors_t MLMETestMode(smacTestMode_t); Arguments smacTestMode_t The test mode selected. Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 3-18 Freescale Semiconductor...
  • Page 39: Smacdisableinterrupts

    CW 3.1.25 SMACDisableInterrupts This function is called to disable the interrupts that are used by SMAC concerning the radio/transceiver: • For MC1323x platform devices - radio interrupts disabled in CNTRL2 register •...
  • Page 40: Smacenableinterrupts

    NOTE This function is executed as part of an interrupt service routine, as a result follow all the recommendations for interrupt execution timing and context. Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 3-20 Freescale Semiconductor...
  • Page 41: Mcpsdataindication

    NOTE This function is executed as part of an interrupt service routine, as a result follow all the recommendations for interrupt execution timing and context. Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 Freescale Semiconductor 3-21...
  • Page 42: Mlmescancomfirm

    NOTE This function is executed as part of an interrupt service routine, as a result follow all the recommendations for interrupt execution timing and context. Simple Media Access Controller (SMAC) for the HCS08 Reference Manual, Rev. 2.0 3-22 Freescale Semiconductor...

Table of Contents