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 5
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.
Page 6
Automatic ACK Listen Before Talk Receive(r) Transmit(ter) Clear Channel Assessment Energy Detect References The following sources were referenced to produce this book: 1. Freescale MKW01 Reference Manual (MKW01xxRM.pdf) MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 Freescale Semiconductor...
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: •...
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 or call SMAC_Config.h file,...
MCU 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.
MKW01 SMAC based stack block diagram. Figure 2-1. SMAC System Decomposition An application programming interface (API) is implemented in the MKW01 SMAC as a C header file ( that allows access to the code. The code includes the API to specific functions. Thus, the application...
Signed 8-bit definition int16_t Signed 16-bit definition int32_t Signed 32-bit definition These data types are used in the MKW01 SMAC project as well as in the applications projects. They are defined in the file. EmbeddedTypes.h 2.2.2 rxPacket_t This structure defines the variable used for MKW01 SMAC received data buffer:...
RxEnableResult = MLMERXEnableRequest(RxPacket, 0); You can use a variable of the type smacErrors_t to store the result of executing MLMERXEnableRequest function. 2.2.3 smacHeader_t This structure defines the variable used for MKW01 SMAC header: typedef PACKED_STRUCT rxPacket_tag{ uint16_t frameControl; uint8_t seqNo;...
Starting position of the buffer where TX or RX data is stored. 2.2.6 txPacket_t This structure defines the type of variable to be transmitted by the MKW01 SMAC. It is located in the file and is defined as follows: SMAC_Interface.h typedef struct txPacket_tag uint8_t u8DataLength;...
} channels_t; Each application derives the minimun and maximum channel values from the enumeration above. SMAC only keeps an enumeration of all the possible channel numbers. Members None MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 Freescale Semiconductor 2-13...
Software Architecture 2.2.8 smacErrors_t This enumeration is used as the set of possible return values on most of the MKW01 SMAC API functions and is located in the . Also, some of the messages sent by SMAC to the application use SMAC_Interface.h...
“LBT” mechanism. autoAck bool_t value to enable/disable the “AA” mechanism. retryCountCCAFail This value specifies the number of times the MKW01 SMAC will attempt to re-transmitt a packet if “LBT” is enabled and channel is found busy. retryCountAckFail This value specifies the number of times the MKW01 SMAC will attempt to re-transmitt a packet if “AA”...
IV[16]; uint8_t KEY[16]; }smacEncryptionKeyIV_t; Members The initial vector used by the CBC mode of AES. The encryption / decryption key used by the CBC mode of AES. MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 2-16 Freescale Semiconductor...
RSSI obtained during the reception pRxPacket pointer to the packet passed as parameter to MLMERXEnableRequest. smacCcaCnf_t Contains a smacErrors_t element. See gMlmeCcaCnf_c Section 2.2.8, “smacErrors_t” MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 Freescale Semiconductor 2-17...
Page 20
SAP handlers aquire the value of those functions. Below are the definitions of the handlers. typedef smacErrors_t ( * SMAC_APP_MCPS_SapHandler_t)(smacToAppDataMessage_t * pMsg, instanceId_t instanceId); MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 2-18 Freescale Semiconductor...
MKW01 SMAC application API. MCPSDataRequest This data primitive is used to send an over-the-air (OTA) packet. This is an asynchronous function, which means it asks the MKW01 SMAC to transmit an OTA packet, but transmission could continue after the function returns. Prototype smacErrors_t MCPSDataRequest(txPacket_t *psTxPacket);...
This primitive creates a message for PHY, sets message type as set transceiver state request, with value of force transceiver off. After passing the message to PHY, SMAC checks if a TX is in progress and clears the buffer containing the packet. MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 3-22 Freescale Semiconductor...
This primitive configures the way SMAC will handle data requests and responses from PHY according to the parameters described by the txContextConfig_t structure. Also, requests forwarded by SMAC to PHY depend on addressing and txContextConfig_t information. MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 Freescale Semiconductor 3-23...
The radio is performing another action and could not attend this request. gErrorNoValidCondition_c The MKW01 SMAC has not been initialized. gErrorNoResourcesAvailable_c The PHY cannot process a MKW01 SMAC request, so the MKW01 SMAC cannot process it. Usage • SMAC must be initialized before calling this function.
PIB request, requiring the gPhyPibRxOnWhenIdle to be set to 0. If the timeout value is greater than 0, the message is filled as a set transceiver state request, disabling the receiver. MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 Freescale Semiconductor...
Returns gErrorNoError_c The channel set has been performed. gErrorBusy_c The MKW01 SMAC is busy in other radio activity like transmitting/receiving data or performing a channel scan. gErrorOutOfRange_c The requested channel is not valid. MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0...
8-bit value for the output power desired. Values 1– 31 are required. Returns gErrorOutOfRange_c u8Power exceeds the maximum power value gMaxOutputPower_c (0x1F). gErrorBusy_c The MKW01 SMAC is busy or PHY is busy. gErrorNoError_c The action is performed. MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 Freescale Semiconductor 3-27...
Call MLMEPAOutputAdjust(u8PaValue); NOTE Be sure to enter a valid value for the PA output adjust. 3.10 MLMEPhySoftReset The MLMEPhySoftReset function is called to perform a software reset to the PHY and MKW01 SMAC state machines. Prototype smacErrors_t MLMEPHYSoftReset(void); Arguments None...
This function creates a message for PHY requesting a CCA on the currently selected channel. After passing the message through the SAP, SMAC changes it’s state to mSmacStatePerformingCca_c MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 Freescale Semiconductor 3-29...
For example, if the return value is gErrorBusy_c, the application can wait on this value until SMAC becomes idle. 3.15 MLMESetSyncWordValue This function updates the value of the synchronization word. MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 3-30 Freescale Semiconductor...
This function sets the frequency drift in number of Fsteps (57 Hz on 30MHz platforms, 61 Hz on 32MHz platforms) passed as parameter to fine tune the central frequency of the channel on MKW01 platforms. The frequency is updated at the next MLMESetChannelRequest call.
The PHY layer can not handle this request. gErrorBusy_c PHY is busy and can not process the request. gErrorNoError_c Everything is normal and the request was processed. MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 3-32 Freescale Semiconductor...
This function creates a message for PHY requesting to set the PAN address pib to the value passed as parameter. If the request is processed, the value is also stored in the SMAC layer for fast processing in case a call to SMACFillHeader is performed. MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 Freescale Semiconductor 3-33...
This function sets the initial vector and encryption key for the encryption process if gSmacUseSecurity_c is defined. Arguments uint8_t* KEY Pointer to a 16 byte buffer containing the key. uint8_t* IV Pointer to a 16 byte buffer containing the initial vector. MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 3-34 Freescale Semiconductor...
Implement two functions that meet the constraints of the function pointers. Then call with the names of the functions. Smac_RegisterSapHandlers smacErrors_t smacToAppMlmeSap(smacToAppMlmeMessage_t* pMsg, instanceId_t instance) switch(pMsg->msgType) case gMlmeEdCnf_c: break; case gMlmeCcaCnf_c: break; case gMlmeTimeoutInd_c: break; MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 Freescale Semiconductor 3-35...
Page 38
Whenever an asynchronous response needs to be passed from SMAC to application, the internal handlers are called, which in turn call the ones defined by the application. MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0 3-36 Freescale Semiconductor...
Need help?
Do you have a question about the MKW01 and is the answer not in the manual?
Questions and answers