NXP Semiconductors MKW01 Скачать руководство пользователя страница 8

MKW01 SMAC Introduction

MKW01 Simple Media Access Controller (SMAC) Reference Manual, Rev. 0.0

1-6

Freescale Semiconductor

 

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 configure packet header (preamble size, synchronization word size, and synchronization 
word value)

Pre-defined settings at four different bands to initialize the SMAC protocol. The currently 
supported operating frequency bands are:

— 863 – 870 MHz (Europe)

— 902 – 928 MHz (US)

— 920 – 928 MHz (Japan)

— 470 – 510 MHz (China)

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 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.1

MKW01 SMAC-based Demonstration Applications

The following is a list of MKW01 SMAC-based demonstration applications:

PC-based Connectivity Test 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 between 

Содержание MKW01

Страница 1: ...Document Number MKW01SMACRM Rev 0 0 3 2015 MKW01 Simple Media Access Controller SMAC Reference Manual...

Страница 2: ...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...

Страница 3: ...t 11 2 2 4 rxStatus_t 12 2 2 5 smacPdu_t 12 2 2 6 txPacket_t 12 2 2 7 channels_t 13 2 2 8 smacErrors_t 14 2 2 9 txContextConfig_t 15 2 2 10 smacTestMode_t 15 2 2 11 packetConfig_t 15 2 2 12 smacRFMode...

Страница 4: ...bleLength 30 3 14 MLMESetSyncWordSize 30 3 15 MLMESetSyncWordValue 30 3 16 MLMEPacketConfig 31 3 17 MLMESetAdditionalRFOffset 31 3 18 MLMEGetAdditionalRFOffset 32 3 19 SMACSetShortSrcAddress 32 3 20 S...

Страница 5: ...ence 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 web...

Страница 6: ...Interface MAC Medium Access Control MCU MicroController Unit NVM Non Volatile Memory PC Personal Computer TERM Serial Port Terminal Application XCVR Transceiver PCB Printed Circuit Board OTA Over the...

Страница 7: ...or externally connected 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 t...

Страница 8: ...uency bands are 863 870 MHz Europe 902 928 MHz US 920 928 MHz Japan 470 510 MHz China Easy to use sample applications included Light weight custom LBT algorithm Light weight custom AA mechanism which...

Страница 9: ...SMAC Basic Initialization Before transmitting receiving or performing any other SMAC operation described in this manual the system protocol must be initialized to configure the transceiver with correc...

Страница 10: ...eded by SMAC to allocate the received and transmitted OTA messages by declaring the buffers that must be of the size gMaxSmacSDULength_c sizeof packet type uint8_t RxDataBuffer gMaxSmacSDULength_c siz...

Страница 11: ...mple communication applications 2 1 Block Diagram Figure 2 1 shows a simplified MKW01 SMAC based stack block diagram Figure 2 1 SMAC System Decomposition An application programming interface API is im...

Страница 12: ..._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 EmbeddedTypes h file 2...

Страница 13: ...cket_t RxPacket RxPacket rxPacket_t RxDataBuffer RxPacket u8MaxDataLength gMaxSmacSDULength_c RxEnableResult MLMERXEnableRequest RxPacket 0 You can use a variable of the type smacErrors_t to store the...

Страница 14: ...on functions rxTimeOutStatus_c This is another of the possible finish conditions for a timeout condition and could be checked by the indication functions rxAbortedStatus_c This status is set when SMAC...

Страница 15: ...u8DataLength to the size in bytes of the payload 6 Use the pointer as the argument when calling MCPSDataRequest uint8_t TxDataBuffer gMaxSmacSDULength_c sizeof txPacket_t txPacket_t TxPacket TxPacket...

Страница 16: ...e a data confirm field with this status Also this value is returned in the CCA confirm message if the scanned channel is found idle gErrorBusy_c This constant is returned when the MKW01 SMAC layer is...

Страница 17: ...MAC will attempt to re transmitt a packet if AA is enabled and no acknowledgement message is received in the expected time frame 2 2 10 smacTestMode_t typedef enum smacTestMode_tag gTestModeForceIdle_...

Страница 18: ...PhyMode4_c gRFMode5_c gPhyMode1ARIB_c ARIB mode 1 gRFMode6_c gPhyMode2ARIB_c ARIB mode 2 gRFMaxMode_c smacRFModes_t Members gRFModeX_c With X from 1 to 4 corresponds to PHY modes 1 to 4 User must chec...

Страница 19: ...acMessageDefs_tag gMcpsDataCnf_c gMcpsDataInd_c gMlmeCcaCnf_c gMlmeEdCnf_c gMlmeTimeoutInd_c gMlme_UnexpectedRadioResetInd_c smacMessageDefs_t The above enumeration summarizes the types of messages pa...

Страница 20: ...lers are function pointers of a special type When application specifies the functions to handle asynchronous responses the SAP handlers aquire the value of those functions Below are the definitions of...

Страница 21: ...Architecture MKW01 Simple Media Access Controller SMAC Reference Manual Rev 0 0 Freescale Semiconductor 2 19 typedef smacErrors_t SMAC_APP_MLME_SapHandler_t smacToAppMlmeMessage_t pMsg instanceId_t in...

Страница 22: ...Software Architecture MKW01 Simple Media Access Controller SMAC Reference Manual Rev 0 0 2 20 Freescale Semiconductor...

Страница 23: ...Returns gErrorNoError_c Everything is ok and the transmission will be performed gErrorOutOfRange_c One of the members in the pTxMessage structure is out of range not valid buffer size or data buffer...

Страница 24: ...d fills it in respect to the user configurations prior to this call and to the information contained in the packet 3 2 MLMETXDisableRequest This function places the radio into stand by and the PHY and...

Страница 25: ...utOfRange_c The number of retries exceeds gMaxRetriesAllowed_c Usage Declare a structure of txContextConfig_t type Set the desired values to the members Call MLMEConfigureTxContext with the address of...

Страница 26: ...orNoValidCondition_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...

Страница 27: ...ameter If this value is 0 SMAC will create a set PIB request asking PHY to enable the gPhyPibRxOnWhenIdle attribute 3 5 MLMERXDisableRequest Returns the radio to idle mode from receive mode Prototype...

Страница 28: ...g the link quality value Returns the result in smacLastDataRxParams linkQuality Zero The MKW01 SMAC has not been initialized Usage Call the MLMELinkQuality Implementation This function reads the store...

Страница 29: ...rototype channels_t MLMEGetChannelRequest void Arguments None Returns channels_t uint8_t The current RF channel Usage Call MLMEGetChannelRequest 3 9 MLMEPAOutputAdjust This function adjusts the output...

Страница 30: ...rNoError_c If the action is performed gErrorNoValidCondition_c If the MKW01 SMAC is not initialized Usage Call MLMEPHYSoftReset Implementation This function creates a set transceiver state request mes...

Страница 31: ...ved in a message passed through the SMAC to application management SAP Arguments None Returns gErrorNoValidCondition_c The MKW01 SMAC has not been initialized gErrorBusy_c Either SMAC or PHY is busy a...

Страница 32: ...is gErrorBusy_c the application can wait on this value until SMAC becomes idle 3 14 MLMESetSyncWordSize This function updates the size of the synchronization word maximum 8 bytes Arguments uint8_t u8s...

Страница 33: ...ed by address as the parameter Arguments packetConfig_t pPacketCfg Pointer to the packetConfig_t structure containing the new values for preamble length synchronization word size and values Returns gE...

Страница 34: ...rorBusy_c the application can wait on this value until SMAC becomes idle 3 18 MLMEGetAdditionalRFOffset This function returns the latest stored frequency drift or 0 if the feature is not enabled Argum...

Страница 35: ...message is passed succesfully to PHY SMAC will set it s own PAN address variable to the new value so that when SMACFillHeader is called the updated data is filled into the header Arguments uint16_t n...

Страница 36: ...address must be changed uint8_t TxDataBuffer gMaxSmacSDULength_c sizeof txPacket_t txPacket_t TxPacket smacErrors_t smacError TxPacket txPacket_t TxDataBuffer SMACFillHeader TxPacket smacHeader gBroad...

Страница 37: ...S_SapHandle Pointer to the function handler for data layer response to asynchronous requests SMAC_APP_MLME_SapHandler_t pSMAC_APP_MLME_SapHandler Pointer to the function handler for management layer r...

Страница 38: ...e gMcpsDataCnf_c break default break MEM_BufferFree pMsg return gErrorNoError_c void InitApp Smac_RegisterSapHandlers SMAC_APP_MCPS_SapHandler_t smacToAppMcpsSap SMAC_APP_MLME_SapHandler_t smacToAppMl...

Отзывы: