Easy Range Extension with FLEXConnect

Software Downloads

Using Antenna Diversity on SiFLEX02-R2-HP

By default the antenna connected to J3 is used for both transmit and receive.

Enabling Antenna Diversity with LSR Application
See the Host Protocol Guide on the SiFLEX02-R2 and SiFLEX02-R2-HP. Message type 0x10 "Set Basic RF Settings" can be used to set the receive antenna to J4, while J3 remains the transmit antenna.

This table lists all the antenna combinations possible, and it is possible in hardware to transmit or receive on either antenna. Note that while this is possible, the only configuration covered in the LSR radio certifications (FCC & IC) is what was implemented in the LSR Application: Transmit and Receive on J3, -or- transmit on J3 receive on J4.

LNA Enable
It most applications it is advisable to enable the LNA, as this will increase the RF range. However in some applications where certain devices may be physically very close to each other the receiver may be at risk for overload and it would be advantageous to raise the receive sensitivity by disabling the LNA.

Ping Pong RF Range Test

Label Information

MAC ID
The MAC ID on the module contains the LSR organizational unique identifier (OUI) of 0x00,0x25,0xCA followed by a unique number. The MAC ID is stored in the microcontrollers flash memory. If the module is reprogrammed the MAC ID will be lost as the flash memory is erased. If the MAC needs to be retained it could be read back from the barcode (described below) or be queried out of the module with a serial host command 0x05 before the module is reprogrammed and then later programmed back in (by host command 0x04 or by a custom application in the module).

LSR Software Application

Host Protocol
The serial communications interface to the module is via a simple UART. Transmit (TX) and receive (RX) are the only two signals required to communicate with the module, and the default communication settings are 19,200 baud, 8 data bits, no parity, and one stop bit (19,200 – 8N1).

Used to enable CTS functionality (off by default) and minimum time between packets being transmitted from the module to the host (0 by default).

Host Msg Type 0x18 "Set Host Data Rate"

Used to set the baud rate (19200 by default).

Sleep Wakeup & Alert, Reset Alert
The wakeup and reset alert settings can be set and queried by the module using host message types 0x1C and 0x1D respectively.

Putting the Device to Sleep
Host message type 0x17 "Set Low Power Mode" is used to put the device into sleep.

Waking up From Sleep
To wake the SiFLEX module out of sleep drive the UART receive pin (module pin #36) low for a minimum of 20uS. Alternatively a dummy byte of 0x00 can be sent, assuming the baud rate is 460,800 or below. The SiFLEX module will wake up from low power mode in under 1mS, at which point the Wakeup Alert Status message will be sent to the host, if enabled.

Wakeup Alert
The Wakeup Alert Status message can be used to alert the host microcontroller when it wakes up from sleep. This useful for two main reasons:

The host microcontroller knows that the SiFLEX module is ready to operate and can then accept commands over the host interface.

The host microcontroller knows the SiFLEX module has woken up from sleep due to an errant condition. For example if noise appeared on the SiFLEX wakeup input pin and the host microcontroller did not know it was out of sleep and drawing current, the power budget could be exceeded.

Reset Alert
The Reset Alert Status message can also be used to alert the host microcontroller when the module has been reset. This is useful so the host microcontroller knows that the SiFLEX module is ready to operate and can then accept commands over the host interface.

FLEXConnect
Selected ModFLEX series modules ship with LSR’s FLEXConnect firmware. The idea behind FLEXConnect is to support applications that require range extension, but don’t need the complexities of a full blown mesh network.

Beacon Mode
The SiFLEX module can be programmed to transmit periodic beacons. See host message types 0x52 to 0x55 for more information.

It is assumed that any device transmitting a periodic beacon is not sleeping as the periodic timer is only running when the device is not sleeping.

NVM Storage
Some of the module's configuration is stored to NVM automatically (such as host baud rate), however most need to be saved manually with the host message 0x12. See the Host Protocol for information on what parameters need to be manually saved.

Integrated Development Environments (IDE)

AVR Studio and WinAVR
AVR Studio and WinAVR are free are open source tools to develop software with SiFLEX. They are used together.

AVR Studio
AVR Studio is the Integrated Development Environment (IDE) developed by Atmel for writing and debugging Atmel AVR applications. AVR Studio 4

Programmers and Debuggers

AVR JTAGICE mkII
Firmware development can be done on the SiFLEX module using development tools available through Atmel. It can be plugged into the LSR Development Board and be easily adapted to other hardware.

AVRISP mkII
In-circuit programming can be done on the SiFLEX module using the AVRISP mkII from Atmel.

Connecting to Development Board

JTAGICE mkII
The AVR JTAGICE mkII plugs into J3 of the Development Board as pictured below. J3 is a 2x5 pin connector.

AVRISP mkII
The AVRISP mkII plugs into J7 of the SiFLEX Development Board as pictured below.

Upgrading Firmware

Software

Hardware Setup

Ensure the Development Board is powered as indicated by the lit green LED (shown below powered by USB). Plug the AVRISP mkII into J7 of the Development Board with the adapter cable. Ensure the AVRISP mkII is plugged into a USB port as indicated by the two green LED’s on the device.

AVR Studio 4 Setup

Run the AVR Studio Software. See the Atmel website or help menu inside AVR Studio 4 for complete information on setting up and using AVR Studio with the AVRISP mkII.

On the Welcome splash screen that appears when you start AVR Studio click the Cancel button.

Click the “Con” Icon in the AVR Studio toolbar.

Select AVRISP in the Platform area, and Auto in the Port area, then click the Connect... button.

On the window that appears when the device connects click on the “Main” tab and in the Device and Signature Bytes dropdown menu select ATxmega256A3U. Click the “Read Signature” button. The status window on the bottom of the window should indicate it has read the signature.

Click on the “Program” tab and in the Flash area navigate to the new *.hex file to FLASH.

Click the “Program” button in the Flash area.

The status window on the bottom of the window should indicate it successfully programmed the SiFLEX02 module.

Circuit Diagram

Reset

The reset (nRESET) pin (14) is an active low input. On the ProFLEX01 module it is pulled high internally with a 47k? resistor. To reset the module, pull the pin low to ground for at least 100?S. This is necessary to ensure a proper reset of the module.

The reset line can be controlled by the host micro or a reset IC. A local reset switch can also be connected if desired. Be sure that if multiple reset sources are tied together that there is no contention between them. In the sample application circuit a 1k ohm series resistor is used to provide some isolation between the programmer/debugger plugged into the JTAG and the host reset as it is possible both could be active at the same time.

JTAG

The JTAG connection is used to download new firmware or as the debug port for firmware development. The connectors shown on the schematic mates with Atmel JTAG ICE and ISP programmer/debugger. It is highly recommended that any host board being developed use these connectors, or if space does not permit at least allow access to to the JTAG pins though test points.

LSR periodically releases new firmware to introduce new features on the module and possibly bug fixes. If the JTAG connections are not accessible the firmware on the module will not be able to be upgraded.

Power Supplies

Note that the PA needs a separate 4.0V DC power supply for the SiFLEX02-R2-HP to operate.

Power Supply Filtering

The VCC pin on the SiFLEX02-R2-HP module may require additional power supply filtering represented on the application circuit with the xx value capacitor. The type of filtering required will depend on the power supply being used to power the module. Care needs to be taken that clean regulated power is supplied to the SiFLEX02-R2 module or performance issues can result.

Host Connections

UART

Pin 35 on the SiFLEX02-R2-HP module is the UART Transmit (output) from the module perspective. It needs to be tied to the UART receive of the host micro.

Pin 36 on the SiFLEX02-R2-HP module is the UART Receive (input) from the module perspective. It needs to be tied to the UART transmit of the host micro.

Pin 37 on the SiFLEX02-R2-HP module is the optional UART CTS pin (output) from the module perspective. It is set high when the module can no longer accept any host messages as the memory is full. The CTS pin functionality needs to be enabled via the serial interface message 0x50 "Set Host Interface Configuration."

Wakeup
To wake the SiFLEX02-R2-HP module out of sleep simply send a dummy byte to the module.

Reset
The host micro in this example is controlling the reset input of the SiFLEX02-R2-HP module.

Switches and LEDs

The LEDs and USER buttons are needed for Ping Pong Range Test built into the LSR firmware. The LED’s are also used during normal operation, and flash to indicate module status (UART activity, RF activity, and heartbeat).

Yellow LED = UART activity

Red LED = RF activity

Green LED = Heartbeat

ForumPost or view product support questions

EMail Technical SupportEmails will be assigned a Technical Support Request (TSR) number and assigned a LSR resource. We work diligently to respond to all email and forum posts as soon as possible.