Page 2
Technical Information Center Schatzbogen 7 support or sustain life, or for any other application in which the failure of the Freescale Semiconductor 81829 Muenchen, Germany product could create a situation where personal injury or death may occur. Should Buyer purchase...
The MC1322x SMAC is incorporated in the Freescale BeeKit Wireless Connectivity Toolkit. The incorporation of the MC1322x SMAC into BeeKit makes it easier for users to employ and customize the MC1322x SMAC and associated applications. The MC1322x SMAC is not the same SMAC used for the MC1319x and MC1321x. The primary differences are as follows: •...
CodeWarrior IDE and is the product from the linking process. S19 does not contain additional information for a debugger (where to look for source files) Safe Mode Boot The Embedded Bootloader boots up using safe default system values SMAC Simple Media Access Controller MC1322x SMAC Reference Manual, Rev. 1.7 Freescale Semiconductor...
The MC1322x SMAC is incorporated in the Freescale BeeKit Wireless Connectivity Toolkit. The incorporation of the MC1322x SMAC into BeeKit makes it easier for users to employ and customize the MC1322x SMAC and associated applications, see the MC1322x SMAC Demonstration Applications User’s Guide (22xSMACDAUG) for more information on these applications.
MC1322x SMAC Introduction Available Devices The MC1322x family is available as two part numbers. These device types differ only in their ROM contents, all other device hardware, performance, and specifications are identical: • MC13224V - this is the original version and is the generic part type.
BeeKit Wireless Connectivity Toolkit, allows users to create, modify, and update various wireless networking implementations. The MC1322x SMAC is released in an independent Codebase that is part of the Freescale BeeKit Wireless Connectivity Toolkit. To create a project for the MC1322x SMAC, users must employ the BeeKit Codebase that contains the MC1322x SMAC code.
MC1322x SMAC Software Architecture This chapter describes the MC1322x SMAC software architecture. The MC1322x SMAC Codebase is different than the S08 targeted SMAC Codebase. BeeKit can use the MC1322x SMAC codebase to create projects to be compiled with the IAR Embedded Workbench IDE.
• Security Enabled • OTAP Enabled An API is implemented in the MC1322x SMAC as a C header file ( ) that allows access to the code. The code includes the API to specific functions. Hardware Support This section describes the MC1322x SMAC hardware support...
MC1322x SMAC and they are implemented as messages. Energy detection and radio idle time out are also implemented as messages. That is why messages are the core of the MC1322x SMAC and it is important to explain the messages in detail both in how are they structured and how they are processed and interfaced.
These functions call the Radio Management handle_new_message function. Because the messages are processed by their states, the process_radio_msg function must also be called periodically to run the message state machine. 2.4.1 Message Types The MC1322x SMAC defines four types of messages: • Reception (RX) • Transmission (TX) •...
Messages passed to the Radio Management module are in an initial state of “requested”. Then they are commanded to the MACA module in the MC1322x PiP to request that the radio perform the indicated command. Then the Radio Management module processes the messages depending on the MACA interrupts.
Signed 8 bit definition int16_t Signed 16 bit definition int32_t Signed 32 bit definition Usage These data types are used in the MC1322x SMAC project as well as in the applications projects. They are defined in the file. typedef.h 2.5.1 message_t This type defines a structure to store the messages information.
This section provides a sample generic application code snippet. For details about a specific function see Chapter 3, MC1322x SMAC Primitives. void a_simple_rx_callback_fn (void) message_t a_TX_msg; message_t a_RX_msg; uint8_t dataTX[smac_pdu_size(TX SIZE)]; uint8_t dataRX[smac_pdu_size(RX SIZE)]; uint8_t main() MC1322x SMAC Reference Manual, Rev. 1.7 Freescale Semiconductor...
Page 19
This macro reads a message state: get_pmsg_state([pointer to the message]) This macro reads a message buffer: tx_pmsg_payload_buffer([Pointer to the message], [Position in the buffer]) This macro sets a message size: set_pmsg_size([Pointer to the message], [Size in bytes]) MC1322x SMAC Reference Manual, Rev. 1.7 Freescale Semiconductor...
This is the type defined for general callbacks, that is a function that is that is passed as an argument to other code. It allows the MC1322x SMAC API to call a subroutine (or function) defined in the application layer.
When the ciphering process success when validating the authentication code value. gFail_c Is the generic (all other failed cases) fail. Core SMAC API This section describes the MC1322x SMAC API functions. 3.2.1 ConfigureBuckRegulator This primitive allows users to enable, disable or bypass the buck regulator. Prototype void ConfigureBuckRegulator(BuckTypes_t BuckRegState);...
Call ConfigureBuckRegulator with the required parameters. NOTE Do not enable the buck regulator when the operating voltage is lower than 2.5 volts. See the MC1322x Reference Manual for more details. 3.2.2 DRVConfigureRTC This primitive allows configuring the Real Time Clock (RTC) to call back a function with a rate defined by the RTC using the indicated reference clock.
== [The TX message].u8Status.msg_state) { MCPSDataRequest([Pointer to the TX message]); 3.2.4 MLMEDozeRequest Doze request allow the user to put the SoC Doze Mode. Review the appropriate MC1322x Reference Manual for details regarding low power modes. Prototype FuncReturn_t MLMEDozeRequest(crmSleepCtrl_t SleepCtl);...
When the message can be added to the message queue. Usage • Create a message object • Associate a buffer with such message object, this buffer will used to store the energy detect value. Use the macro MSG_INIT MC1322x SMAC Reference Manual, Rev. 1.7 Freescale Semiconductor...
The current RF channel. 0xFF If current channel could not be detected Usage Call MLMEGetPromiscuousMode. 3.2.7 MLMEGetPromiscuousMode This function returns the current state of promiscuous mode. Prototype bool_t MLMEGetPromiscuousMode(void); Arguments None. MC1322x SMAC Reference Manual, Rev. 1.7 Freescale Semiconductor...
3.2.9 MLMEHibernateRequest This call places the radio into Hibernate mode. Refer to the MC1322x Reference Manual for more information on the operation modes. This low power mode retains the 96Kb of RAM. If no fail is returned, gSuccess_c is returned after the system wakes up.
LQi(dbm) = (LQI(dec)/3)-100 Eqn. 3-1 Prototype FuncReturn_t MLMELinkQuality (uint8_t * u8ReturnValue); Arguments u8ReturnValue A pointer to a 8 bit value where the LQI value will be stored. Returns gSuccess_c This function always return gSuccess_c. MC1322x SMAC Reference Manual, Rev. 1.7 Freescale Semiconductor...
MLMEPHYSoftReset The MLMEPHYSoftReset function is called to perform a soft reset to the SoC. This function differs from previous SMAC where just the radio is reset. Prototype void MLMEPHYSoftReset(void); Arguments None MC1322x SMAC Reference Manual, Rev. 1.7 3-10 Freescale Semiconductor...
None Usage Simply calls the MLMEPHYSoftReset () function directly. NOTE This function resets the complete MC1322x PiP. The behavior is the same as a power on reset. 3.2.14 MLMEPHYXtalAdjust This function adjusts the external oscillator supply by a trim value. For more information about the trim value, see the MC1322x Reference Manual and Data Sheet.
Use zero value for receive without a timeout. The timeout value is given in MACA CLK ticks. If this is a 250 KHz frequency, then each count on the Timeout value represents 4 micro seconds. MC1322x SMAC Reference Manual, Rev. 1.7 3-12 Freescale Semiconductor...
This function scans the predefined channels and stores the scanned Energy Detect value on every channel. Energy detect values range from 0x00 to 0xFF 0x00 The channel has practically no activity 0xFF The channel has heavy traffic and is very busy MC1322x SMAC Reference Manual, Rev. 1.7 Freescale Semiconductor 3-13...
If a correct channel between gChannel11_c to gChannel26_c is requested. gFailNoValidCondition_cIf trying to set gChannel26_c while external PA is configured. gFailOutOfRange_c If the value passed is not between gChannel11_c to gChannel26_c. MC1322x SMAC Reference Manual, Rev. 1.7 3-14 Freescale Semiconductor...
(the flags that indicate each one of the options are: gTimerWuEn_c, gRTCWuEn_c and gExtWuKBI_c). u8KBIPol This argument indicates the polarity at KBI which will awake the device. MC1322x SMAC Reference Manual, Rev. 1.7 Freescale Semiconductor 3-15...
MLMETestMode By employing this function, users can execute a test of the radio. Some basic test modes are necessary to help MC1322x SMAC users evaluate their hardware. Test mode implements the following: • Force_idle — Places the radio back into idle mode •...
AES-128 and supporting three operation modes: • • • For further details about MC1322x Advanced Security Module, refer to the MC1322x Reference Manual. 3.3.1 CipherConfigure The CipherConfigure function sets the key, counter, and cipher mode. Function...
CTR and CBC modes. CCM mode combines the CTR mode for protecting the privacy of data and the CBC mode to generate a MAC to protect the data from unauthorized modifications. Figure 3-1. CTR and CBC Ciphering Modes MC1322x SMAC Reference Manual, Rev. 1.7 3-18 Freescale Semiconductor...
– Buffer length exceeds the maximum value – Buffer length is not a multiple of 128 bits – Buffer length is zero gFailCorrupted ASM hardware does not respond. gSuccess_c Ciphering action was performed. MC1322x SMAC Reference Manual, Rev. 1.7 Freescale Semiconductor 3-19...
This section details the functions required to use the OTAP module from the application. Only one function is currently provided. For more details about how an application uses the OTAP module, see the MC1322x SMAC Demonstration Applications User’s Guide (22xSMACDAUG).
#endif [Normal application tasks] NOTE The global variable gbOtapExecute controls the execution of the OTAP and this variable is set or reset by OTAP module, it does not write to it. MC1322x SMAC Reference Manual, Rev. 1.7 3-22 Freescale Semiconductor...
RX message between the application and the OTAP module. Returns None Usage OTAP_Init must be called at the end of the initialization section as shown on the following sample code. #if OTAP_ENABLED == TRUE OTAP_Init(&RX_msg); gbOtapExecute = OTAP_ENABLED; #endif MC1322x SMAC Reference Manual, Rev. 1.7 Freescale Semiconductor 3-23...
MC1322x SMAC Primitives Support Function API This section describes support functions included with the MC1322x SMAC Codebase, accessible through library. For more details about module configuration and these functions, see the MC1322x MC1322x.a Reference Manual (MC1322xRM). 3.5.1 ConfigureRfCtlSignals ConfigureRfCtlSignals the the functionality for RF signals: ANT1, ANT2, TXON and RXON.
If the SetDemulatorMode option is not used, by default, the SMAC uses DCD. Prototype void SetDemulatorMode(DemTypes_t demodulator); Arguments demodulator Chooses the type of demodulator. Returns None Usage Call this function with NCD or DCD, depending on the desired mode. SetDemulatorMode(NCD); MC1322x SMAC Reference Manual, Rev. 1.7 3-26 Freescale Semiconductor...
RadioInit(uint32_t u32ClockFreq, uint8_t u8PN, uint32_t u32LoopDiv); Arguments uint32_t u32ClockFreq This is the platform clock frequency set to 24 MHz. uint8_t u8PN Integer value of the reference XTAL| loop divider for synthesizer. uint32_t u32LoopDiv Loop divider frequency. MC1322x SMAC Reference Manual, Rev. 1.7 Freescale Semiconductor 3-27...
Page 48
MC1322x SMAC Primitives Returns None Usage Call this function to configure the radio and for low power mode operation. RadioInit(PLATFORM_CLOCK, gDigitalClock_PN_c, u32LoopDiv); MC1322x SMAC Reference Manual, Rev. 1.7 3-28 Freescale Semiconductor...
Need help?
Do you have a question about the MC1322x and is the answer not in the manual?
Questions and answers