The Freescale MCR20A Simple Media Access Controller (MCR20A SMAC) is a simple ANSI C based codebase available as sample source code. The MCR20A SMAC is used for developing proprietary RF transceiver applications using Freescale’s MCR20A 2.4 GHz transceiver 

Fork of fsl_smac by Freescale

The MCR20A 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 MCR20A SMAC is provided as part of the Example Application Demos available for MCR20A and also as a standalone set of files.

SMAC features include:

  • Compact footprint.
  • Very low power, proprietary, bidirectional RF communication link.
  • The MCR20A radio allows packet filtering by hardware by checking the preamble and the synchronization word, which reduces software overhead and memory footprint.
  • Broadcast communication.
  • Unicast communication — MCR20A 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 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 by changing the default value from SMAC_Config.h file or by calling SMACSetPanID(uint16_t nwShortPanID.
  • There are no blocking functions within the MCR20A SMAC.
  • Easy-to-use sample applications included.
  • Light-weight, custom LBT algorithm.
  • 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 MCR20A 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).

Documentation

SMAC Reference Manual

Committer:
andreikovacs
Date:
Tue Aug 18 12:48:33 2015 +0000
Revision:
0:401ba973869e
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andreikovacs 0:401ba973869e 1 /*!
andreikovacs 0:401ba973869e 2 * Copyright (c) 2014, Freescale Semiconductor, Inc.
andreikovacs 0:401ba973869e 3 * All rights reserved.
andreikovacs 0:401ba973869e 4 *
andreikovacs 0:401ba973869e 5 * \file SMAC_Channels.h
andreikovacs 0:401ba973869e 6 *
andreikovacs 0:401ba973869e 7 * Redistribution and use in source and binary forms, with or without modification,
andreikovacs 0:401ba973869e 8 * are permitted provided that the following conditions are met:
andreikovacs 0:401ba973869e 9 *
andreikovacs 0:401ba973869e 10 * o Redistributions of source code must retain the above copyright notice, this list
andreikovacs 0:401ba973869e 11 * of conditions and the following disclaimer.
andreikovacs 0:401ba973869e 12 *
andreikovacs 0:401ba973869e 13 * o Redistributions in binary form must reproduce the above copyright notice, this
andreikovacs 0:401ba973869e 14 * list of conditions and the following disclaimer in the documentation and/or
andreikovacs 0:401ba973869e 15 * other materials provided with the distribution.
andreikovacs 0:401ba973869e 16 *
andreikovacs 0:401ba973869e 17 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
andreikovacs 0:401ba973869e 18 * contributors may be used to endorse or promote products derived from this
andreikovacs 0:401ba973869e 19 * software without specific prior written permission.
andreikovacs 0:401ba973869e 20 *
andreikovacs 0:401ba973869e 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
andreikovacs 0:401ba973869e 22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
andreikovacs 0:401ba973869e 23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
andreikovacs 0:401ba973869e 24 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
andreikovacs 0:401ba973869e 25 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
andreikovacs 0:401ba973869e 26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
andreikovacs 0:401ba973869e 27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
andreikovacs 0:401ba973869e 28 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
andreikovacs 0:401ba973869e 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
andreikovacs 0:401ba973869e 30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
andreikovacs 0:401ba973869e 31 */
andreikovacs 0:401ba973869e 32
andreikovacs 0:401ba973869e 33 #ifndef _SMAC_CHANNELS_H
andreikovacs 0:401ba973869e 34 #define _SMAC_CHANNELS_H
andreikovacs 0:401ba973869e 35
andreikovacs 0:401ba973869e 36
andreikovacs 0:401ba973869e 37 /************************************************************************************
andreikovacs 0:401ba973869e 38 *************************************************************************************
andreikovacs 0:401ba973869e 39 * Include
andreikovacs 0:401ba973869e 40 *************************************************************************************
andreikovacs 0:401ba973869e 41 ************************************************************************************/
andreikovacs 0:401ba973869e 42
andreikovacs 0:401ba973869e 43 /************************************************************************************
andreikovacs 0:401ba973869e 44 *************************************************************************************
andreikovacs 0:401ba973869e 45 * Public macros
andreikovacs 0:401ba973869e 46 *************************************************************************************
andreikovacs 0:401ba973869e 47 ************************************************************************************/
andreikovacs 0:401ba973869e 48
andreikovacs 0:401ba973869e 49 /************************************************************************************
andreikovacs 0:401ba973869e 50 *************************************************************************************
andreikovacs 0:401ba973869e 51 * Public prototypes
andreikovacs 0:401ba973869e 52 *************************************************************************************
andreikovacs 0:401ba973869e 53 ************************************************************************************/
andreikovacs 0:401ba973869e 54
andreikovacs 0:401ba973869e 55 /************************************************************************************
andreikovacs 0:401ba973869e 56 *************************************************************************************
andreikovacs 0:401ba973869e 57 * Public type definitions
andreikovacs 0:401ba973869e 58 *************************************************************************************
andreikovacs 0:401ba973869e 59 ************************************************************************************/
andreikovacs 0:401ba973869e 60
andreikovacs 0:401ba973869e 61 /************************************************************************************
andreikovacs 0:401ba973869e 62 *************************************************************************************
andreikovacs 0:401ba973869e 63 * Public memory declarations
andreikovacs 0:401ba973869e 64 *************************************************************************************
andreikovacs 0:401ba973869e 65 ************************************************************************************/
andreikovacs 0:401ba973869e 66
andreikovacs 0:401ba973869e 67 /************************************************************************************
andreikovacs 0:401ba973869e 68 *************************************************************************************
andreikovacs 0:401ba973869e 69 * Public functions
andreikovacs 0:401ba973869e 70 *************************************************************************************
andreikovacs 0:401ba973869e 71 ************************************************************************************/
andreikovacs 0:401ba973869e 72
andreikovacs 0:401ba973869e 73 /* 802.15.4-2006 maximum channel enumeration */
andreikovacs 0:401ba973869e 74 #if defined (gPHY_802_15_4g_d)
andreikovacs 0:401ba973869e 75 gChannel0_c = 0,
andreikovacs 0:401ba973869e 76 gChannel1_c,
andreikovacs 0:401ba973869e 77 gChannel2_c,
andreikovacs 0:401ba973869e 78 gChannel3_c,
andreikovacs 0:401ba973869e 79 gChannel4_c,
andreikovacs 0:401ba973869e 80 gChannel5_c,
andreikovacs 0:401ba973869e 81 gChannel6_c,
andreikovacs 0:401ba973869e 82 gChannel7_c,
andreikovacs 0:401ba973869e 83 gChannel8_c,
andreikovacs 0:401ba973869e 84 gChannel9_c,
andreikovacs 0:401ba973869e 85 gChannel10_c,
andreikovacs 0:401ba973869e 86 gChannel11_c,
andreikovacs 0:401ba973869e 87 gChannel12_c,
andreikovacs 0:401ba973869e 88 gChannel13_c,
andreikovacs 0:401ba973869e 89 gChannel14_c,
andreikovacs 0:401ba973869e 90 gChannel15_c,
andreikovacs 0:401ba973869e 91 gChannel16_c,
andreikovacs 0:401ba973869e 92 gChannel17_c,
andreikovacs 0:401ba973869e 93 gChannel18_c,
andreikovacs 0:401ba973869e 94 gChannel19_c,
andreikovacs 0:401ba973869e 95 gChannel20_c,
andreikovacs 0:401ba973869e 96 gChannel21_c,
andreikovacs 0:401ba973869e 97 gChannel22_c,
andreikovacs 0:401ba973869e 98 gChannel23_c,
andreikovacs 0:401ba973869e 99 gChannel24_c,
andreikovacs 0:401ba973869e 100 gChannel25_c,
andreikovacs 0:401ba973869e 101 gChannel26_c,
andreikovacs 0:401ba973869e 102 gChannel27_c,
andreikovacs 0:401ba973869e 103 gChannel28_c,
andreikovacs 0:401ba973869e 104 gChannel29_c,
andreikovacs 0:401ba973869e 105 gChannel30_c,
andreikovacs 0:401ba973869e 106 gChannel31_c,
andreikovacs 0:401ba973869e 107 gChannel32_c,
andreikovacs 0:401ba973869e 108 gChannel33_c,
andreikovacs 0:401ba973869e 109 gChannel34_c,
andreikovacs 0:401ba973869e 110 gChannel35_c,
andreikovacs 0:401ba973869e 111 gChannel36_c,
andreikovacs 0:401ba973869e 112 gChannel37_c,
andreikovacs 0:401ba973869e 113 gChannel38_c,
andreikovacs 0:401ba973869e 114 gChannel39_c,
andreikovacs 0:401ba973869e 115 gChannel40_c,
andreikovacs 0:401ba973869e 116 gChannel41_c,
andreikovacs 0:401ba973869e 117 gChannel42_c,
andreikovacs 0:401ba973869e 118 gChannel43_c,
andreikovacs 0:401ba973869e 119 gChannel44_c,
andreikovacs 0:401ba973869e 120 gChannel45_c,
andreikovacs 0:401ba973869e 121 gChannel46_c,
andreikovacs 0:401ba973869e 122 gChannel47_c,
andreikovacs 0:401ba973869e 123 gChannel48_c,
andreikovacs 0:401ba973869e 124 gChannel49_c,
andreikovacs 0:401ba973869e 125 gChannel50_c,
andreikovacs 0:401ba973869e 126 gChannel51_c,
andreikovacs 0:401ba973869e 127 gChannel52_c,
andreikovacs 0:401ba973869e 128 gChannel53_c,
andreikovacs 0:401ba973869e 129 gChannel54_c,
andreikovacs 0:401ba973869e 130 gChannel55_c,
andreikovacs 0:401ba973869e 131 gChannel56_c,
andreikovacs 0:401ba973869e 132 gChannel57_c,
andreikovacs 0:401ba973869e 133 gChannel58_c,
andreikovacs 0:401ba973869e 134 gChannel59_c,
andreikovacs 0:401ba973869e 135 gChannel60_c,
andreikovacs 0:401ba973869e 136 gChannel61_c,
andreikovacs 0:401ba973869e 137 gChannel62_c,
andreikovacs 0:401ba973869e 138 gChannel63_c,
andreikovacs 0:401ba973869e 139 gChannel64_c,
andreikovacs 0:401ba973869e 140 gChannel65_c,
andreikovacs 0:401ba973869e 141 gChannel66_c,
andreikovacs 0:401ba973869e 142 gChannel67_c,
andreikovacs 0:401ba973869e 143 gChannel68_c,
andreikovacs 0:401ba973869e 144 gChannel69_c,
andreikovacs 0:401ba973869e 145 gChannel70_c,
andreikovacs 0:401ba973869e 146 gChannel71_c,
andreikovacs 0:401ba973869e 147 gChannel72_c,
andreikovacs 0:401ba973869e 148 gChannel73_c,
andreikovacs 0:401ba973869e 149 gChannel74_c,
andreikovacs 0:401ba973869e 150 gChannel75_c,
andreikovacs 0:401ba973869e 151 gChannel76_c,
andreikovacs 0:401ba973869e 152 gChannel77_c,
andreikovacs 0:401ba973869e 153 gChannel78_c,
andreikovacs 0:401ba973869e 154 gChannel79_c,
andreikovacs 0:401ba973869e 155 gChannel80_c,
andreikovacs 0:401ba973869e 156 gChannel81_c,
andreikovacs 0:401ba973869e 157 gChannel82_c,
andreikovacs 0:401ba973869e 158 gChannel83_c,
andreikovacs 0:401ba973869e 159 gChannel84_c,
andreikovacs 0:401ba973869e 160 gChannel85_c,
andreikovacs 0:401ba973869e 161 gChannel86_c,
andreikovacs 0:401ba973869e 162 gChannel87_c,
andreikovacs 0:401ba973869e 163 gChannel88_c,
andreikovacs 0:401ba973869e 164 gChannel89_c,
andreikovacs 0:401ba973869e 165 gChannel90_c,
andreikovacs 0:401ba973869e 166 gChannel91_c,
andreikovacs 0:401ba973869e 167 gChannel92_c,
andreikovacs 0:401ba973869e 168 gChannel93_c,
andreikovacs 0:401ba973869e 169 gChannel94_c,
andreikovacs 0:401ba973869e 170 gChannel95_c,
andreikovacs 0:401ba973869e 171 gChannel96_c,
andreikovacs 0:401ba973869e 172 gChannel97_c,
andreikovacs 0:401ba973869e 173 gChannel98_c,
andreikovacs 0:401ba973869e 174 gChannel99_c,
andreikovacs 0:401ba973869e 175 gChannel100_c,
andreikovacs 0:401ba973869e 176 gChannel101_c,
andreikovacs 0:401ba973869e 177 gChannel102_c,
andreikovacs 0:401ba973869e 178 gChannel103_c,
andreikovacs 0:401ba973869e 179 gChannel104_c,
andreikovacs 0:401ba973869e 180 gChannel105_c,
andreikovacs 0:401ba973869e 181 gChannel106_c,
andreikovacs 0:401ba973869e 182 gChannel107_c,
andreikovacs 0:401ba973869e 183 gChannel108_c,
andreikovacs 0:401ba973869e 184 gChannel109_c,
andreikovacs 0:401ba973869e 185 gChannel110_c,
andreikovacs 0:401ba973869e 186 gChannel111_c,
andreikovacs 0:401ba973869e 187 gChannel112_c,
andreikovacs 0:401ba973869e 188 gChannel113_c,
andreikovacs 0:401ba973869e 189 gChannel114_c,
andreikovacs 0:401ba973869e 190 gChannel115_c,
andreikovacs 0:401ba973869e 191 gChannel116_c,
andreikovacs 0:401ba973869e 192 gChannel117_c,
andreikovacs 0:401ba973869e 193 gChannel118_c,
andreikovacs 0:401ba973869e 194 gChannel119_c,
andreikovacs 0:401ba973869e 195 gChannel120_c,
andreikovacs 0:401ba973869e 196 gChannel121_c,
andreikovacs 0:401ba973869e 197 gChannel122_c,
andreikovacs 0:401ba973869e 198 gChannel123_c,
andreikovacs 0:401ba973869e 199 gChannel124_c,
andreikovacs 0:401ba973869e 200 gChannel125_c,
andreikovacs 0:401ba973869e 201 gChannel126_c,
andreikovacs 0:401ba973869e 202 gChannel127_c,
andreikovacs 0:401ba973869e 203 gChannel128_c
andreikovacs 0:401ba973869e 204 #else
andreikovacs 0:401ba973869e 205
andreikovacs 0:401ba973869e 206 gChannel11_c = 0x0B,
andreikovacs 0:401ba973869e 207 gChannel12_c,
andreikovacs 0:401ba973869e 208 gChannel13_c,
andreikovacs 0:401ba973869e 209 gChannel14_c,
andreikovacs 0:401ba973869e 210 gChannel15_c,
andreikovacs 0:401ba973869e 211 gChannel16_c,
andreikovacs 0:401ba973869e 212 gChannel17_c,
andreikovacs 0:401ba973869e 213 gChannel18_c,
andreikovacs 0:401ba973869e 214 gChannel19_c,
andreikovacs 0:401ba973869e 215 gChannel20_c,
andreikovacs 0:401ba973869e 216 gChannel21_c,
andreikovacs 0:401ba973869e 217 gChannel22_c,
andreikovacs 0:401ba973869e 218 gChannel23_c,
andreikovacs 0:401ba973869e 219 gChannel24_c,
andreikovacs 0:401ba973869e 220 gChannel25_c,
andreikovacs 0:401ba973869e 221 gChannel26_c
andreikovacs 0:401ba973869e 222 #endif
andreikovacs 0:401ba973869e 223
andreikovacs 0:401ba973869e 224 #endif /* _SMAC_CHANNELS_H */