Table of Contents
ADF7023 - No-OS Driver for Renesas Microcontroller Platforms
The ADF7023 is a very low power, high performance, highly integrated 2FSK/GFSK/OOK/MSK/GMSK transceiver designed for operation in the 862 MHz to 928 MHz and 431 MHz to 464 MHz frequency bands, which cover the worldwide license-free ISM bands at 433 MHz, 868 MHz, and 915 MHz. It is suitable for circuit applications that operate under the European ETSI EN300-220, the North American FCC (Part 15), the Chinese short-range wireless regulatory standards, or other similar regional standards. Data rates from 1 kbps to 300 kbps are supported.
The transmit RF synthesizer contains a VCO and a low noise fractional-N PLL with an output channel frequency resolution of 400 Hz. The VCO operates at 2× or 4×, the fundamental frequency to reduce spurious emissions. The receive and transmit synthesizer bandwidths are automatically, and independently, configured to achieve optimum phase noise, modulation quality, and settling time. The transmitter output power is programmable from −20 dBm to +13.5 dBm, with automatic PA ramping to meet transient spurious specifications. The part possesses both single-ended and differential PAs, which allows for Tx antenna diversity.
The receiver is exceptionally linear, achieving an IP3 specification of −12.2 dBm and −11.5 dBm at maximum gain and minimum gain, respectively, and an IP2 specification of 18.5 dBm and 27 dBm at maximum gain and minimum gain, respectively. The receiver achieves an interference blocking specification of 66 dB at ±2 MHz offset and 74 dB at ±10 MHz offset. Thus, the part is extremely resilient to the presence of interferers in spectrally noisy environments. The receiver features a novel, high speed, automatic frequency control (AFC) loop, allowing the PLL to find and correct any RF frequency errors in the recovered packet.
A patent pending, image rejection calibration scheme is available through a program download. The algorithm does not require the use of an external RF source nor does it require any user intervention once initiated. The results of the calibration can be stored in nonvolatile memory for use on subsequent power-ups of the transceiver.
The goal of this project (Microcontroller No-OS) is to be able to provide reference projects for lower end processors, which can't run Linux, or aren't running a specific operating system, to help those customers using microcontrollers with ADI parts. Here you can find a generic driver which can be used as a base for any microcontroller platform and also specific drivers for different microcontroller platforms.
The driver contains two parts:
- The driver for the ADF7023 part, which may be used, without modifications, with any microcontroller.
- The Communication Driver, where the specific communication functions for the desired type of processor and communication protocol have to be implemented. This driver implements the communication with the device and hides the actual details of the communication protocol to the ADI driver.
The Communication Driver has a standard interface, so the ADF7023 driver can be used exactly as it is provided.
There are three functions which are called by the ADF7023 driver:
- SPI_Init() – initializes the communication peripheral.
- SPI_Write() – writes data to the device.
- SPI_Read() – reads data from the device.
SPI driver architecture
The following functions are implemented in this version of ADF7023 driver:
|char ADF7023_Init(void)||Initializes the ADF7023.|
|void ADF7023_GetStatus(unsigned char* status)||Reads the status word of the ADF7023.|
|void ADF7023_SetCommand(unsigned char command)||Initiates a command.|
|void ADF7023_SetFwState(unsigned char fwState)||Sets a FW state and waits until the device enters in that state.|
|void ADF7023_GetRAM(unsigned long address, unsigned long length, unsigned char* data)||Reads data from the RAM.|
|void ADF7023_SetRAM(unsigned long address, unsigned long length, unsigned char* data)||Writes data to RAM.|
|void ADF7023_ReceivePacket(unsigned char* packet, unsigned char* length)||Receives one packet.|
|void ADF7023_TransmitPacket(unsigned char* packet, unsigned char length)||Transmits one packet.|
|void ADF7023_SetChannelFrequency(unsigned long chFreq)||Sets the channel frequency.|
|void ADF7023_SetDataRate(unsigned long dataRate)||Sets the data rate.|
|void ADF7023_SetFrequencyDeviation(unsigned long freqDev)||Sets the frequency deviation.|
- PmodRF3 Demo for RL78G14: https://github.com/analogdevicesinc/no-OS/tree/master/Renesas/RL78G14/PmodRF3
- RL78G14 Common Drivers: https://github.com/analogdevicesinc/no-OS/tree/master/Renesas/RL78G14/Common
Renesas RL78G14 Quick Start Guide
This section contains a description of the steps required to run the ADF7023 demonstration project on a Renesas RL78G14 platform using the PmodRF3.
- The ADF7023 demonstration project for the Renesas RL78G14 platform.
The ADF7023 demonstration project for the Renesas RL78G14 platform consists of three parts: the ADF7023 Driver, the PmodRF3 Demo for RL78G14 and the RL78G14 Common Drivers.
All three parts have to be downloaded.
Software Project Tutorial
This section presents the steps for developing a software application that will run on the Renesas Demo Kit for RL78G14 for controlling and monitoring the operation of the ADI part.
- Run the IAR Embedded Workbench for Renesas RL78 integrated development environment.
- Choose to create a new project (Project – Create New Project).
- Select the RL78 tool chain, the Empty project template and click OK.
- Select a location and a name for the project (ADIEvalBoard for example) and click Save.
- Open the project’s options window (Project – Options).
- From the Target tab of the General Options category select the RL78 – R5F104PJ device.
- From the Setup tab of the Debugger category select the TK driver and click OK.
- Copy the downloaded files into the project's folder.
- The new source files have to be included into the project. Open the Add Files… window (Project – Add Files…), select all the copied files and click open.
- At this moment, all the files are included into the project.
- The project is ready to be compiled and downloaded on the board. Press the F7 key to compile it. Press CTRL + D to download and debug the project.
- A window will appear asking to configure the emulator. Keep the default settings and press OK.
- To run the project press F5.