Summary of Contents for Silicon Laboratories Si4012
Page 1
UIDE 1. Introduction This document gives an overview of how to configure and use the Si4012 radio transmitter and provides several simple software examples. The Silicon Laboratories’ Si4012 is a fully integrated, crystal-less CMOS high-data rate RF transmitter designed for the sub-GHz ISM band.
Page 2
LCD base board. The example code runs on the C8051F930 MCU of the MSC-LCDBB930 LCD base board and controls the Si4012 on the RF Pico Board using the SMBus interface. The signals listed in Table 2 are connected:...
Page 3
AN746 Table 2. Pin Assignments Si4012 C8051F930 Pin # Pin Name Pin Function Pin # Pin name Ground Ground Supply input NIRQ Interrupt status output, active low P1.4 Shutdown input, active high P1.5 SMBus clock input/output P0.7 SMBus data input/output P0.6...
3.1. Wireless Development Suite (WDS) The recommended starting point for Si4012 development is the WDS. It can be downloaded from silabs.com and can be installed on a PC. After connecting one of the hardware platforms described in this document to the PC, WDS is able to identify the connected board by reading the EBID memories of the board.
4. Controlling the Si4012 The Si4012 has four pins to interface with the host MCU: SDN is the shutdown input of the IC. When it is pulled high or left open, the Si4012 goes to its shutdown state; when pulled low, the Si4012 wakes up.
Page 6
TX_FREQ MODULATION_FSKDEV BITRATE_CONFIG in hex form that have to be used as parameters of the SET_PROPERTY command to be sent to the Si4012. The commands typically used for initialization are: SET_PROPERTY SET_INT CHANGE_STATE ...
Page 7
AN746 The generated header file contains the precompiled commands according to the parameter values set on the Control Panel of WDS. Here is a part of the header file used in the examples: #define Si4012_MODE_SELECTION 0x60, 0x00, 0x00 Selected mode: Standby #define Si4012_TUNE_INTERVAL 0x11, 0x21, 0x00, 0x0A Tune interval: 10 #define Si4012_MODULATION_FSKDEV 0x11, 0x20, 0x01, 0x18...
Page 8
4.3. Interrupt Handling The NIRQ pin of the Si4012 is used to issue interrupts to the host. The host should poll the NIRQ pin or use interrupts (NIRQ) to get interrupt status. The host can then read the interrupt status of the radio with GET_INT_STATUS command that also clears the interrupts at the same time.
Page 9
If Cload > 14 pF, XoLowCap field of the XO_CONFIG property have to be set to 0. In this case, the input capacitance of the XTAL pin of the Si4012 is 5 pF, so a (Cload – 5)pF capacitor should be placed externally across the crystal terminals.
The following list contains a complete set of such programs: Silicon Laboratories IDE—Used to open the preconfigured project files and manage the build process. Keil C51 v9.0+ or SDCC v3.0+—Compilers to use in accordance with the Silicon Laboratories IDE to manage build process.
AN746 5.1.4. Software Modules In the sample projects the layered software approach is followed. There’s a distinct scope for each software module and such modules can communicate through each other’s API functions. The software modules are separated and focused to cover one specific task. The following figure shows the software layers and its relations. Application Handlers Libraries...
Page 12
5.2.1. Empty Project (Base_Project) This sample project is intended to demonstrate the basic concept of setting up the Si4012 radio chip. This project is the essential core of the following three sample codes (CW_Transmit, PN9, TX). It is primarily responsible for initializing the MCU and RFIC as well.
Page 13
In the main() function, the SampleCode_Demo_Pollhandler() is responsible for several tasks: 1. It checks if the Si4012 Pico board is connected to the LCD Baseboard. 2. Reads the RF EBID content in order to learn to which frequency band the Pico board is designed for. The possible options can be either 434 MHz or 915 MHz.
Page 15
Read the EBID content to determine the radio type and the frequency band Having detected the RF Pico board successfully, the next state will configure the Si4012 RFIC. 2. SM_STEP1: Configure the radio with the WDS generated parameters ...
Page 16
AN746 5.2.2. Continuous Wave Transmission (CW_Transmit) Since the radio configuration happened according to the empty project, the only remaining task is to start the CW mode transmission with the Si4012_Start_CW_Mode() function. Having done the radio configuration, the transmission will start shortly thereafter. To illustrate how to expand the code with dynamic behavior, SM_STEP2 provides the user with a clear example of how to use the LCD baseboard push-buttons for turning in/out the CW transmission.
Page 17
AN746 5.2.3. Pseudo Random Transmission (PN9) Since the radio configuration happened according to the empty project, the only remaining task is to start the CW mode transmission with the Si4012_Start_PN9_Mode(U8 bModeSelector) function. Having done the radio configuration, the transmission will start shortly thereafter. To illustrate how to expand the code with dynamic behavior, SM_STEP2 provides the user with a clear example of how to use the LCD baseboard push-buttons for turning in/out the PN-9 transmission.
Page 19
The two-byte CRC is implemented in the CRC.h module by CRC_CalculateCRC16(U8* pbInputData, U8 bLengthOfInputData) function. The Si4012 related functions are implemented in the Si4012.h module. These functions can manipulate the radio such as turn off/on the radio chip, start/stop the different transmit modes (CW/ PN9), send packets using the built-in FIFO, and set the internal properties via the radio’s Application Programming...
Page 20
AN746 The Setup_Si4012.h module configuration should be generated by the Wireless Development Studio, edited, and then added to the project in order to enable the Si4012_Configure() function to initialize the radio chip. During the configuration, the Si4012_SetProperty(…) function will initialize the API properties by sending the arrays of bytes beginning with prefix of SI4012_CONFIG_ARRAY_DATA_RADIO.
Page 21
AN746 The additional header files should be included in the common bsp.h located in the src/drivers directory. The bsp.h file already contains included headers: Rev. 0.1...
Page 22
AN746 5.3. Common Software Modules In the modules hierarchy the common software modules are located between the application and the hardware layers. It is a set of interfaces that provides possibilities to be able to control various peripherals on modular HW platforms.
Page 23
AN746 5.3.3. SPI Driver The SPI related source files, called spi.h and spi.c, can be found in the /src/driver/ folder. To enable the SPI interface the SPI port has to be enabled and associated to the crossbar. The directions of the SCK, MISO and MOSI ports have to be configured properly on the IO port.
Page 24
AN746 5.3.5. Human-Machine Interface Module The HMI related source files, called hmi.h and hmi.c, can be found in the /src/driver/ folder. In order to use this module, the required handlers need to be initialized at the very beginning of the program. Checking the status of the various hardware components require to have a common cyclic mechanism.
Page 25
AN746 By using the buzzer related sub-interface, state of buzzer can be changed to the required one. void vHmi_InitBuzzer(void); void vHmi_ChangeBuzzState(eHmi_BuzzStates qiBuzzState); void vHmi_BuzzHandler(void); To manipulate the buzzer’s behavior dynamically, eHmi_BuzzStates needs to be used. typedef enum _eHmi_BuzzStates { eHmi_BuzzOff_c = 0x00, /**< Buzz is in off state */ eHmi_BuzzStdBy_c = 0x01, /**< Buzz waits for state change */ eHmi_BuzzOn_c = 0x10, /**< Buzz is in on state */ eHmi_Buzz2Hz_c = 0x20, /**< Buzz 2Hz */ eHmi_Buzz1Hz_c = 0x30, /**< Buzz 1Hz */ eHmi_Buzz0Hz5_c = 0x40, /**< Buzz 0.5Hz */ eHmi_Buzz0Hz25_c = 0x41, /**< Buzz 0.25Hz */ eHmi_BuzzOnce_c = 0x50, /**< Buzz once */ ...
Page 26
AN746 5.4. Empty Project Structure An empty project structure can be found along with sample projects on the silabs.com website for reference. The empty project has been created to help users starting to write their custom firmware with preconfigured project files, common directory structure, and Silicon Labs drivers.
Page 27
AN746 /*‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐*/ /* Application specific includes */ /*‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐*/ #include "compiler_defs.h" #include "platform_defs.h" #include "hardware_defs.h" #include "..\application\application_defs.h" #include "spi.h" #include "..\application\radio_config.h" #include "..\application\radio.h" #include "..\drivers\radio\radio_hal.h" #include "..\drivers\radio\radio_comm.h" #ifdef SILABS_RADIO_SI446X #include "..\drivers\radio\Si446x\si446x_api_lib.h" #include "..\drivers\radio\Si446x\si446x_defs.h" #include "..\drivers\radio\Si446x\si446x_nirq.h" #include "..\drivers\radio\Si446x\si446x_patch.h" #endif #ifdef SILABS_RADIO_SI4455 #include "..\drivers\radio\Si4455\si4455_api_lib.h" #include "..\drivers\radio\Si4455\si4455_defs.h" #include "..\drivers\radio\Si4455\si4455_nirq.h" #endif Description of the header files: compiler_defs.h—Contains compiler related definitions in order to provide a uniform way to use non-ANSI C keywords, such as BIT, XDATA, SEGMENT_VARIABLE and more.
Page 28
AN746 5.4.1. Porting the Project for another MCU The porting of an example project to an MCU of choice can be done easily thanks to the layered approach of the project structure. This reduces the effort required to compile the code for other architecture, as only the low-level functions must be modified.
Page 30
The products must not be used within any Life Support System without the specific written consent of Silicon Laboratories. A "Life Support System" is any product or system intended to support or sustain life and/or health, which, if it fails, can be reasonably expected to result in significant personal injury or death.
Need help?
Do you have a question about the Si4012 and is the answer not in the manual?
Questions and answers