Transceiver OL2381 using wireless M-BUS

AN11017
Transceiver OL2381 using wireless M-BUS
Rev. 2 — 10 May 2011
Application note
Document information
Info
Content
Keywords
OL2381, Transceiver, 868 MHz, wireless M-BUS, OMS.
Abstract
This document describes how to use OL2381 in Wireless M-BUS
applications.
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
Revision history
Rev
Date
Description
v.2
20110510
second issue
Modifications:
•
v.1
20110422
Values added to the register address 0x01 column in table 13.
first issue
Contact information
For more information, please visit: http://www.nxp.com
For sales office addresses, please send an email to: [email protected]
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
2 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
1. Introduction
This application note describes how to use the NXP transceiver OL2381 in a wireless
M-Bus application.
Wireless M-Bus is a European standard Ref. 5 for the transmission of data from utility
meters such as gas, heat and water. Its primary use is in the Short Range Devices (SRD)
unlicensed telemetry band at 868 MHz. As a broad definition, this standard can be applied
to various applications.
This application note only describes the physical layer.
The OL2381 is a highly integrated and fully software configurable, single-chip transceiver
operating in ISM/SRD band. The OL2381 has a small form factor, low power
consumption, and a wide supply voltage range. These features make it suitable for use in
battery powered handheld devices and their counterparts.
OL2381 value propositions for wireless M-Bus are:
•
•
•
•
•
•
•
Full wireless M-Bus compliance (except N-mode)
Efficient RF power amplifier with programmable power output
Highly sensitive receiver with programmable gain
Programmable data rate
Programmable center frequency; on-the-fly and multi-channel operation
Intelligent state machine reduces microcontroller load and power consumption
Several automatic signal monitors allow long system battery life
– wake-up search timer
– RSSI level checker
– coding checker
– baud rate checker
– preamble detection
• Programmable IF filter for different bandwidth requirements:
– narrowband for long range with low data rate
– wideband for short range with high data rate
This application note focuses on the 868 MHz application, however, the 433 MHz
(F-Mode) frequency is also supported (refer to draft version of Ref. 3).
For a specific wireless M-BUS solution, refer to Ref. 6 which provides a complete energy
metering solution with software, hardware and data sheets. The internet solution uses a
3-wire SPI interface, whereas this document describes the 7-wire interface.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
3 of 43
xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxxxxxxxxxx xxxxxxxxxx xxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxx
xxxxx xxxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxx xxxxxxx xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx xxxxxxxxxxxxxx xxxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxx xxxxx x x
NXP Semiconductors
AN11017
Application note
SIGNAL SIGNATURE RECOGNITION UNIT
TRANSMIT
STATE MACHINE
BAUD-RATE
GENERATOR
P11/INT
POLLING
TIMER
RECEIVE
STATE MACINE
TIMING
CLASSIFICATION
MODULATION
AMPLITUDE
CLASSIFICATION
PREAMBLE
DETECTION
UNIT
P14/IND
TEN
limiter
LNA
CHANNEL
FILTER
RF_IN
limiter
RSSI
FM
DEMOD
FSK
DATA
FILTER
P12/CLOCK
P13/SDO
ASK
EDGE
SLICER
RSSI
Rev. 2 — 10 May 2011
MANCHESTER
DECODER
P10/DATA
BASEBAND PROCESSING
SEN
SDIO
SPI
CONTROL LOGIC, GAIN
SCLK
PTDIS
VCO
AUTO
CALIBRATION
RESET
GENERATOR
NUM/FRACTIONAL-N PLL
PFD
POWER AMPLIFIER
RF_OUT
BIAS
CONTROL
90 º
0º
General blocks
Fig 1.
optionally
to P12
MAIN DIVIDER
Transmit blocks
Block diagram of the OL2381 transceiver.
÷2
OR
÷4
buffer
loop filter
VCO
Receive blocks
CHARGE
PUMP
XTAL
OSCILLATOR
XTAL_1
XTAL_2
REG
DIG
VREG_DIG
(digital supply)
REG
PLL
VREG_PLL
(PLL supply)
REG
VCO
VREG_VCO
(VCO supply)
REG
PA
VREG_PA
(PA supply)
019aab753
AN11017
4 of 43
© NXP B.V. 2011. All rights reserved.
Transceiver OL2381 using wireless M-BUS
All information provided in this document is subject to legal disclaimers.
50 kHz to
300 kHz
CLOCK
RECOVERY
LEVEL
SLICER
1.1 OL2381 Block diagram
CHANNEL FILTER
AUTO CALIBRATION
RSSI LEVEL
CLASSIFICATION
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
1.2 Document overview
This application note comprises the following sections:
•
•
•
•
•
•
•
•
AN11017
Application note
Section 2 - Reasoning behind the wireless M-BUS
Section 3 - Details of the physical layer
Section 4 - Programming information for the general registers
Section 5 - Programming information for the transmit registers
Section 6 - Programming information for the receive registers
Section 7 - Transmit/receive operation procedures
Section 8 - A hardware example is detailed
Section 9 - A representation of the software in a block diagram
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
5 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
2. Wireless M-BUS
To help protect against climate change, the EU passed a directive in 2006 which commits
its members to reduce their energy consumption. The directive was intended to raise
awareness of climate change due to energy consumption by promoting reduction in heat,
gas, electricity, water and so on. Smart meters can make this information readily
accessible and are key to realizing this goal.
Since 2010, it is compulsory to equip new buildings with smart metering devices that are
able to resend their data.
The 868 MHz SRD band was chosen because it has good data transmission range
characteristics. In this European license-free band, all users must follow regulating rules
intended to prevent overloading. These rules limit output power, duty cycle, and spectral
emissions. This regulation enables many transmitters to work in parallel within a finite
area.
The physical and data link layer for wireless M-BUS is specified in the European Standard
(Ref. 5). Different modes are specified for various applications in this standard. The
modes are described in the following chapters (as of February 2011, the C-, F- and
N-modes have not yet been released).
2.1 Wireless M-Bus mode S1
Meter
Mode S1
Slink
Collector
Stationary Receiver
Battery or Mains powered
019aab754
Fig 2.
Mode S1
Table 1.
Mode S1
Title
Description[1]
Application
transmit only meter for stationary receiving readout
Sending rate
six times a day - the battery receiver needs only to be active during
these time slots, or it is periodically searching for the long header.
Center Frequency
868.30 MHz
FSK Deviation
±50 kHz
Data Encoding
Manchester
Chip Rate
32.768 kchip/s (data rate = 16,384 bps)
Frame
long header (576 chips)
[1]
All values provided are typical values unless otherwise stated.
The metering devices only send their data to the data collector several times per day.
Consequently, the data collector is in the sleep mode for most of the day and only needs
to be awakened to receive the metering data. Alternatively, it periodically searches for a
valid transmission that typically starts with a long header. Read-out on request is not
possible in this mode.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
6 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
2.2 Wireless M-Bus mode S1-m
Meter
Mode S1-m
Slink
Collector
Stationary or Mobile
Receiver
019aab755
Fig 3.
Mode S1-m
Table 2.
Mode S1-m
Title
Description[1]
Application
Stationary mode - transmit only meter, for stationary or mobile receivers
Sending rate
30 times per hour - the receiver must be continuously enabled
Center Frequency
868.30 MHz
FSK Deviation
±50 kHz
Data Encoding
Manchester
Chip Rate
32.768 kchip/s (data rate = 16,384 bps)
Preamble
short header (48 chips)
[1]
All values provided are typical values unless otherwise stated.
S1-m is same as S1, but transmit interval is shorter. So mobile receivers can await this
time.
2.3 Wireless M-Bus mode S2
Slink
Meter
Mode S2
Slink
Collector
Stationary Transceiver
019aab756
Fig 4.
Mode S2
Table 3.
Mode S2
Title
Description[1]
Application
Stationary mode - bidirectional communication in S1 or S1-m mode.
Sending rate
same as S1/S1-m, depending on the mode used
Center Frequency
868.30 MHz (both directions)
FSK Deviation
±50 kHz
Data Encoding
Manchester
Chip Rate
32.768 kchip/s (data rate = 16,384 bps)
Preamble
short header or optional long header (48 chips)
[1]
All values provided are typical values unless otherwise stated.
The meter periodically sends data and its receiver is only enabled for a short period after
each transmission. A bidirectional communication is established only if the stationary
transceiver asks for a request within this short period.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
7 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
2.4 Wireless M-Bus mode T1
Meter
Mode T1
Tlink
Collector
Stationary or Mobile
Receiver
019aab757
Fig 5.
Mode T1
Table 4.
Mode T1
Title
Description[1]
Application
frequent transmission, short telegrams
Sending rate
same as S1/S1-m, depending on the mode used
Center Frequency
868.95 MHz
FSK Deviation
(±40 kHz to ±80 kHz)
Data Encoding
3 out of 6
Chip Rate
100 kchip/s (data rate = 66.67 bps)
Preamble
short header (48 chips)
[1]
All values provided are typical values unless otherwise stated.
2.5 Wireless M-Bus mode T2
Tlink
Meter
Mode T2
Slink
Collector
Stationary or Mobile
Transceiver
019aab758
Fig 6.
Mode T2
Table 5.
Mode T2
Title
Description[1]
Application
frequent transmission, bidirectional
Sending rate
short data burst <5 ms every few seconds
Center Frequency
868.95 MHz (T)
868.30 MHz (S)
FSK Deviation
(±40 kHz to ±80 kHz)
Data Encoding
3 out of 6 (T) / Manchester (S)
Chip Rate
100 kchip/s (T) / 32.768 kchip/s (S)
Preamble
short header (48 chips)
Response delay
3 ms
[1]
All values provided are typical values unless otherwise stated.
Meter unit transmits on a regular basis similar to Type T1. Its receiver is enabled for a
short period after the end of each transmission and locks on if an acknowledge is received
(at 32.768 kchip/s). Further bidirectional communication in the 0.1 % frequency band
using 100 kchip/s (meter transmit) and 32.768 kchip/s (meter receive) can follow.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
8 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
Note that communication from the meter to collector uses the physical layer of the
T-mode. The physical layer parameters for the reverse direction are identical to the
S-mode.
2.6 Wireless M-Bus mode C1
Meter
Mode C1
Tlink
Collector
Stationary or Mobile
Receiver
019aab759
Fig 7.
Mode C1
Table 6.
Mode C1
Title
Description[1]
Application
Compact mode - frequent transmission, short telegrams
Sending rate
short data burst <22 ms on regular basis
Center Frequency
868.95 MHz
FSK Deviation
±45 kHz
Data Encoding
NRZ
Chip Rate
100 kchip/s (data rate = 100 bps)
Preamble
short header (32 chips)
[1]
All values provided are typical values unless otherwise stated.
2.7 Wireless M-Bus mode C2
Tlink
Meter
Mode C2
Clink
Collector
Stationary or Mobile
Transceiver
019aab760
Fig 8.
Mode C2
Table 7.
Mode C2
Title
Description[1]
Application
Compact mode - frequent transmission, bidirectional
Sending rate
short data burst <22 ms on regular basis
Center Frequency
868.95 MHz (T)
869.525 MHz (C)
FSK Deviation
±45 kHz
Data Encoding
NRZ
Chip Rate
100 kchip/s (data rate = 100 bps)
Preamble
short header (32 chips)
[1]
AN11017
Application note
All values provided are typical values unless otherwise stated.
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
9 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
Meter unit transmits on a regular basis similar to type C. Its receiver is enabled for a short
period after the end of each transmission and if an acknowledge is received it locks on.
Further bidirectional communication in the 0.1 % frequency band can follow.
The same receiver can receive T-mode and C-mode. Because of the use of GFSK
modulation at C-link, the transmission allows more data with the same energy budget.
2.8 Wireless M-Bus mode R2
Rlink
Meter
Mode R2
Rlink
Collector
Stationary or Mobile
Transceiver
019aab761
Fig 9.
Mode R2
Table 8.
Mode R2
Title
Description[1]
Application
frequent reception, bidirectional, long range
Sending rate
meter transmit only on request
Center Frequency
868.33 MHz (collector to meter)
868.03 + n*0.06 MHz (meter to collector)
FSK Deviation
±6 kHz
Data Encoding
Manchester
Chip Rate
4.8 kchip/s (data rate = 2.4 bps)
Frame
medium header (96 chip)
Response delay
3 ms (collector) / 10 ms (meter)
[1]
All values provided are typical values unless otherwise stated.
In mode R2, the meter periodically listens for a request. If a request is received, the meter
data is sent to the collector. Due to frequency multiplexing, several metering devices can
be read at the same time. The communication settings for each direction are different. The
communication devices must support fast switching between these settings.
The OL2381 is unable to receive multiple channels at the same time. However, due to a
medium header, and OL2381 fast switching frequency, it is possible to poll several
channels and read the channel that contains data.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
10 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
2.9 Wireless M-Bus mode F2a
Flink
Meter
Mode F2a
Flink
Collector
019aab762
Fig 10. Mode F2a
Table 9.
Mode F2a
Title
Description[1]
Application
frequent receive and transmit mode
long range two-way communication, readout on demand
Sending rate
meter listens every few seconds
Center Frequency
433.82 MHz
FSK Deviation
±5.5 kHz
Data Encoding
NRZ
Chip Rate
2.4 kchip/s (data rate = 2.4 bps)
Preamble
extended preamble for wake-up
Response delay
2 ms
[1]
All values provided are typical values unless otherwise stated.
2.10 Wireless M-Bus mode F2b
Flink
Meter
Mode F2b
Flink
Collector
Stationary Transceiver
019aab763
Fig 11. Mode F2b
Table 10.
Mode F2b
Title
Description[1]
Application
frequent transmit and receive mode
long range two-way communication for stationary readout
Sending rate
meter transmits a number of times per day
communication is possible after transmission
Center Frequency
433.82 MHz
FSK Deviation
±5.5 kHz
Data Encoding
NRZ
Chip Rate
2.4 kchip/s or 4.8 kchip/s (data rate = 2.4 bps or 4.8 bps)
Preamble
-
Response delay
2 ms
[1]
AN11017
Application note
All values provided are typical values unless otherwise stated.
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
11 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
2.11 Wireless M-Bus mode N1, N2a-g
Nlink
Meter
Mode N
Nlink
Collector
019aab764
Fig 12. Mode N1, N2a-g
Table 11.
Mode N1, N2a-g
Title
Description[1]
Application
narrowband communication
long range communication in VHF frequency band
Center Frequency
169.4 MHz
[1]
All values provided are typical values unless otherwise stated.
Because the center frequency does not comply with the working range of OL2381, this
mode is not supported by OL2381.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
12 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
3. Physical layers
There are five different physical radio links identified in Section 2. These links are named
S, T, C, R, and F radio links, in the following chapters.
Table 12.
Physical Radio links
Radio Link
Used in the following modes
S
meter S1
→ collector
Frequency MHz[1]
FSK Dev. kHz[1]
868.3
±50
868.95
±45
meter S1-m → collector
meter S2
→ collector
collector
→ meter S2
collector
→ meter T2
meter T1
→ collector
meter T2
→ collector
meter C1
→ collector
meter C2
→ collector
C
collector
→ meter C2
869.525
±45
R
collector
→ meter R2
868.03 + n × 60 kHz
±6
meter R2
→ collector
meter F2a
→ collector
433.82
±5.5
collector
→ meter F2a
meter F2b
→ collector
collector
→ meter F2b
T
F
[1]
AN11017
Application note
All values provided are typical values unless otherwise stated.
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
13 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
4. General register settings
This section briefly explains the settings of the receiver and transmitter common registers;
see Figure 13. Not all registers are described in this application note, for more information
please refer to data sheet Ref. 1 or application note Ref. 2.
Frequency register (FC0L+FC0M+FC0H) is used as an example in the flow chart provided
by Figure 13. It is possible to have up to four different frequency setups for applications
using different frequencies and to switch easily between them.
OL2381
configuration
Frequency registers: FC0[L, M, H], FC1[L, M, H],
FC2[L, M, H]; FC3[L, M, H];
LOCON (bit RF_LO_DIV)
Baud Rate: TIMING0, TIMING1
Clock Configuration: CLOCKCON
Configuration of the PLL: EXPERT0
Ports Configuration: PORTCON0, PORTCON1,
PORTCON2
TX
RX
TX/RX
TX Configuration
RX Configuration
019aab765
Fig 13. Register settings flow chart
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
14 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
4.1 Frequency settings
Four frequencies can be preset into OL2381 registers 0x00 to 0x0b. For the simplicity of
this document only one frequency is set in registers 0x00 to 0x02. Figure 14 shows an
example of the settings for 868.3 MHz in the general registers and the equations to
calculate them. To set frequencies above 500 MHz, the VCO frequency is divided by 2
and bit RF_LO_DIV is set to logic 0.
019aab766
Fig 14. Frequency configuration
FCx[19:15] =
FCx[14:0] =
f RF
------ × ( 1 + RF_LO_DIV ) – 32.5
f ref
f RF
------ × ( 1 + RF_LO_DIV ) – ( 32 – FCx[19:15] ) × 16384
f ref
(1)
(2)
Where:
fRF = required center frequency.
fref = 16 MHz [quartz].
RF_LO_DIV = 0 (for S, T, C and R).
RF_LO_DIV = 1 (for F).
= floor () function ( e.g.2.8 → 2 )
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
(3)
© NXP B.V. 2011. All rights reserved.
15 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
Table 13.
M-Bus register frequency settings
M-Bus
OL2381 register address
radio link FCOL (0x00) FCOM (0x01)
FCOH (0x02)
LOCON (0x0d)
S
0x60
0x26
0xb2
0x00
868.30 MHz
T
0x90
0x79
0xb2
0x00
868.95 MHz
C
0x30
0xc3
0xb2
0x00
869.525 MHz
R
0xd0
0x03
0xb2
0x00
868.03 MHz (n = 0)
0x80
0x0b
0xb2
0x00
868.09 MHz (n = 1)
0x30
0x13
0xb2
0x00
868.15 MHz (n = 2)
0xe0
0x1a
0xb2
0x00
868.21 MHz (n = 3)
0x80
0x22
0xb2
0x00
868.27 MHz (n = 4)
0x30
0x2a
0xb2
0x00
868.33 MHz (n = 5)
0xe0
0x31
0xb2
0x00
868.39 MHz (n = 6)
0x90
0x39
0xb2
0x00
868.45 MHz (n = 7)
0x40
0x41
0xb2
0x00
868.51 MHz (n = 8)
0xf0
0x48
0xb2
0x00
868.57 MHz (n = 9)
0xe0
0xd1
0xb1
0x01
433.82 MHz
F
Frequency (f)
4.2 Baud rate
Figure 15 shows the general register settings for chip rate and the equations to calculate
them are provided below the figure. The chip rate is equivalent to the symbol. In this
example, the watchdog timer is set to 4 ms.
019aab7
Fig 15. Baud rate configuration
Where:
MAINSC = max ( 0, min ( 2047, kchip × 2
PRESC =
PRESC
– 2047.5 ) )
8191
log 2 × -----------------------------------------------------------------------------2 × max ( 25, min ( 3000, kchip ) )
chip_rate × 4096 × 128
kchip = ------------------------------------------------------f ref
(4)
(5)
(6)
Chip_rate = desired chip rate.
fref = reference frequency (16 MHz)
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
16 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
Table 14.
M-bus register setting Baud rate
M-bus
OL2381 Register address
radio link Timing0 (0x0e)
Chip rate (Chip/s)
Timing1 (0x01)
S
0x63
0x48
32768
T, C
0xcd
0x44
100000
R
0xd5
0x61
4800
F
0xd5
0x69
2400
4.3 PLL
The recommended value for the PLL loop bandwidth is ICP 2, as shown in Figure 16.
019aab768
Fig 16. PLL loop bandwidth configuration
Table 15.
M-Bus PLL register settings
M-Bus radio link
OL2381 register address
Information
EXPERT0 (0x31 bank 1)
S, T, C, R, F
0x02
current = 2 × 15 μA
Remark: This register EXPERT0 is located in Bank1 which means that it is necessary to
switch the bank at address 0x3f to 0x01. Afterwards, switch back to 0x00.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
17 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
4.4 Port configuration
Writing to, and reading from OL2381 registers is always done through SPI ports (green
lines in Figure 17). The Host Controller is always clock master.
Sending and receiving RF data is done in this example through separate pins (blue lines
in Figure 17) and the OL2381 is always clock master.
MOSI
SDIO
MISO
P13/SDO
SCLK
SCLK
HOST
Port1
CONTROLLER
Port2
P10/DATA
Port3
P12/CLOCK
Port4
P11/INT
SEN
OL2381
019aab769
Fig 17. SPI communication and separate TX/RX data, clock port and Interrupt pins
The port register settings for this configuration are shown in the following sections.
Different configurations, such as working with a three wire interface, is explained in data
sheet Ref. 1, application note Ref. 2. It is recommended that the SPI controller hardware
is used to reduce processing load on the host controller, especially for data.
4.4.1 Port PORTCON0
The settings for register PORTCON0 are shown in Figure 18 which represents the reset
condition for OL2381.
The data to the host controller can be inverted by setting bit P10INV to logic 1.
019aab770
Fig 18. Port configuration PORTCON0
Table 16.
M-Bus register PORTCON0 settings
M-Bus radio link
OL2381 Register address
Information
PORTCON0 (0x10)
S, T, C, R, F
AN11017
Application note
0x28
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
reset condition
© NXP B.V. 2011. All rights reserved.
18 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
4.4.2 Port PORTCON1
Register PORTCON1 is set as shown in Figure 19 (P13/SDO is not used, and P12 is set
as the clock pin). For applications that require an inverted clock, case bit P12INV is set.
019aab771
Fig 19. Port configuration PORTCON1
Table 17.
M-Bus register PORTCON1 settings
M-Bus radio link
OL2381 register address
Information
PORTCON1 (0x11)
S, T, C, R
0x04
pin 12 is the clock for RX and TX
F
0x05
pin 12 inverts the clock for RX and TX
4.4.3 Port PORTCON2
Register PORTCON2 is set as shown in Figure 20 (bits SEP_TX_LINES and
SEP_RX_OUT set to 11).
019aab772
Fig 20. Port configuration PORTCON2
Table 18.
M-Bus register PORTCON2 settings
M-Bus radio link
OL2381 register address
Information
PORTCON2 (0x12)
S, T, C, R, F
0x66
7-wire interface
The configuration of P14 depends on the RF switch; details are given in data sheet Ref. 1.
In this example it is set to provide “0” for RX-mode and “1” for TX-mode.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
19 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
5. TX register settings
This section explains how to set the registers used by the transmitter in this application.
The full transmitter flow chart is shown in Figure 21. Not all registers are described in this
application note. Refer to data sheet Ref. 1 or application note Ref. 2 for more
information.
TX Configuration
PA Configuration:
Register TXCON
Register ACON0 or ACON1
FSK
Modulation
ASK
Configuration of the frequency deviation: FDEV
Configuration of the ramp: FRMP
Configuration of ACON2
Configuration of the ramp: ARMP
Configuration of the TX flags:
- Frequency
- Manchester
- ASK/FSK
- ACON0/ACON1
Activate Transmit command
see Chapter 7
019aab773
Fig 21. Flow chart of TX registers
5.1 Power Amplifier (PA) configuration
The PAM bits in register TXCON set the voltage for the power amplifier voltage regulator.
PAM0 (PAM bits set to 00) is the recommended value for power amplifier operation. The S
link and the R link use Manchester data, but there are some non-Manchester data bits in
the preamble. As a result, the transmitter should work for all modes in the non-Manchester
mode. The Manchester coding of the payload is performed by the host controller. These
settings are shown in Figure 22.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
20 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
019aab774
Fig 22. PA configuration
Table 19.
M-Bus PA register settings
M-Bus radio link
OL2381 register address
Information
TXCON (0x20)
S, T, C, R, F
0x40
PAM = 0, TXCLKSEL = 0, send inverted
data
Output power can be trimmed by setting bits AMH0 in register ACON0. Setting register
ACON0 as shown in Figure 23 provides approximately 10 dBm of output power.
019aab775
Fig 23. Output power configuration
Table 20.
M-Bus output power register settings for FSK-mode
M-Bus radio link
OL2381 register address
Output power
S, T, C, R, F
0x00
approximately −70 dBm (PA off)
S, T, C, R, F
0x01
approximately −20 dBm
...
...
...
S, T, C, R, F
0x1F
approximately +10 dBm
ACON0 (0x1C)
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
21 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
5.2 Modulation type and frequency deviation
ASK0 bit is set to 0 for FSK modulation; see Figure 23.
Register FDEV configures the frequency deviation; see Figure 24.
019aab776
Fig 24. Frequency deviation configuration
⎛
⎧ + DOUBLE_SD_RESULT
FDEV ⎫ ⎞
FDEV_EXP = min ⎜ 7, max ⎨ 1
---------------------------------------------------------------------- , log 2 × ---------------- ⎬ ⎟
15.75 ⎭ ⎠
1 + RF_LO_DIV
⎝
⎩
(7)
FDEV
⎞
FDEV_MANT = min ⎛ 31, 0.5 + -------------------------⎝
FDEV_EXP ⎠
2
(8)
Where:
fdev = wanted frequency deviation.
FDEV = fdev × 65 536 / 16 000 000 [= reference clock].
DOUBLE_SD_RESULT = 0.
RF_LO_DIV[S,T,C,R] = 0.
RF_LO_DIV[F] = 1.
= floor () function ( e.g.2.8 → 2 )
Table 21.
(9)
M-Bus frequency deviation register settings
M-Bus radio link
OL2381 register address
Output power
FDEV (0x1A)
AN11017
Application note
S
0x7A
fdev = 50 kHz
T, C
0x77
fdev = 45 kHz
R
0x2C
fdev = 6 kHz
F
0x17
fdev = 5.5 kHz
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
22 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
5.3 Soft-FSK
To reduce transmit bandwidth in mode C2, the European standard Ref. 3 uses G-FSK for
the link collector to meter. The OL2381 reduces transmit bandwidth by a linear
interpolation approach, see Figure 25 and Figure 26.
f-fc
+fdev
0
t
-fdev
019aab777
Fig 25. Linear shaping of FSK signal
019aab778
Fig 26. Soft FSK register settings
The settings in Table 22, provide a value of 50 % slope for C-mode.
Table 22.
M-Bus soft-FSK register settings
M-Bus radio link
OL2381 register address
Information
C
0x07
50 % slope at this data rate
S, T, R, F
0x00
rectangular
FRMP (0x1B)
Remark: This value represents the slew rate of the baseband signal and it must be
recalculated for other data rates; see data sheet Ref. 1.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
23 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
6. RX register settings
This section explains how to set the registers used by the receiver in this application. The
full receiver flow chart is shown in Figure 27. Not all registers are described in this
application note. Refer to data sheet Ref. 1 or application note Ref. 2 for more
information.
RX Configuration
Configuration of the LNA + Channel filter gains
RXGAIN (GAINSTEP, HIGAINLIM if needed)
Configuration of the Channel filter bandwidth
and modulation choise RXBW
Configuration of the preamble length: PREACON
Configuration of the preamble data: PREA0 to PREA2
Configuration of the baseband filter
RXBBCON
Yes
Configuration of the receive mode:
RXCON
Configuration of
POLLWUPTIME
Configuration of the timing check unit:
TIMINGCHK
Configuration of
POLLACTION
Polling timer
No
Configuration of RX
command:
Manchester, Gain,
Frequency
(according to
previous regsisters)
Configuration of the slicer:
SLICERINITL, SLICERINITH
Configuration of RXFOLLOWUP
FSK
Modulation
ASK
Configuration of WUPST0 (if needed)
Edge
Slicer
Level
Slicer
Configuration of SIGMON0, RXDCON0 (if needed)
Configuration of the signal monitoring:
- Modulation amplitude range: UMODAMPTH;
EMODAMPTH; LMODAMPTH
- RSSI level:
UPPERRSSITH, LOWERRSSITH
Configuration of SIGMON1, RXDCON1 (if needed)
Configuration of SIGMON2 (if needed), RXDCON2
see Chapter 7
Activate Receive command
019aab779
Fig 27. RX registers flow chart
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
24 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
6.1 LNA configuration
The gain of the LNA can be programmed in 16 steps. In WUPS mode, the receiver
automatically detects the signal strength and decides to use either the HI_GAIN, or the
LOW_GAIN setting. This is important to achieve a large dynamic range.
In this example, HI_GAIN is set to maximum gain and LOW_GAIN is set to minimum gain.
This is shown in Figure 28 (default value).
019aab780
Fig 28. LNA configuration
Table 23.
M-Bus LNA configuration register settings
M-Bus radio link
OL2381 register address Information
RXGAIN (0x21)
S, T, C, R, F
0xF0
HI_GAIN = maximum, LOW_GAIN = minimum
If the RSSI exceeds the value given in register HIGAINLIM during wake-up search (see
Figure 29), the receiver switches to LOW_GAIN. The GAINSTEP register is set to 0.
019aab781
Fig 29. Automatic gain
Table 24.
M-Bus automatic gain register settings
M-Bus radio link OL2381 register address
Information
GAINSTEP (0x23) HIGAINLIM (0x24)
S, T, C, R, F
AN11017
Application note
0x00
0x78
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
at this input power the LNA switches
to LO_GAIN
© NXP B.V. 2011. All rights reserved.
25 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
6.2 Channel bandwidth configuration
Register RXBW sets the demodulation choice (ASK/FSK) and channel filter (IF)
bandwidth. If FSK modulation is used, bit DEMOD_ASK is set to logic 0.
To optimize receiver performance, the bandwidth is chosen carefully. It must be close to
the bandwidth occupied by the modulated signal including the center frequency
tolerances of transmitter and receiver.
The center frequency tolerances are mainly dependent on the crystal used in the receiver
and transmitter. This is not calculated in the following example.
RSSI_FILTER_FC is set to 5 which means that the RSSI value is filtered so that the
bandwidth value is more stable.
019aab782
Fig 30. Register RXBW
Table 25.
M-Bus channel bandwidth register settings
M-Bus radio link
OL2381 register address Information
RXBW (0x22)
S
0x15
fdev = 80 kHz, fmod = 16.6 kHz → BW = 200 kHz
T, C
0x05
fdev = 80 kHz, fmod = 55 kHz → BW = 300 kHz
R, F
0x55
fdev = 7.2 kHz, fmod = 2.4 kHz → BW = 50 kHz
BW ≥ 2 × (fdev + fmod) (as a rule of thumb, crystal tolerance is not considered).
Where:
fdev = maximum displayed frequency deviation.
fmod = maximum displayed modulation frequency.
If higher bandwidth is required, set register EXPERT2 (0x33 bank 1) to 0xC2.
Table 26.
M-Bus channel register settings for EXPERT2 register
M-Bus radio link
OL2381 register address Information
EXPERT2 (0x33 bank 1)
AN11017
Application note
S, T, C
0xc2
set bit 6 and bit 7 for BW > 200 kHz
R, F
0x02
default
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
26 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
6.3 Baseband filter configuration
Register RXBBCON sets the baseband filter cut-off frequency. It must be appropriate to
the selected chip rate; see Figure 31.
DEGLITCHER_WINDOW_LEN is set to 01 to reduce noise.
019aab783
Fig 31. Baseband filter configuration
Table 27.
M-Bus baseband filter cut-off frequency register settings
M-Bus radio link
OL2381 register address Information (fc > 0.5 × chip rate)
RXBBCON (0x27)
AN11017
Application note
S
0x42
chip rate = 32768
→ fc = 28.405 kHz
T, C
0x41
chip rate = 100000
→ fc = 57.174 kHz
R
0x45
chip rate = 4800
→ fc = 3.5400 kHz
F
0x46
chip rate = 2400
→ fc = 1.7701 kHz
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
27 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
6.4 Manchester decoder and clock recovery
The Manchester decoder is activated in register RXCON as shown in Figure 32. The
Manchester decoder is used for S and R radio links (→ Manchester violations during
preamble are supported). CLOCK_RECOV_TC for clock rate deviation is set to 01
supporting a maximum TX baud rate frequency tolerance of 4 %.
019aab784
Fig 32. Manchester decoder
Table 28.
M-Bus Manchester decoder register settings
M-Bus radio link
OL2381 register address Information
RXCON (0x35)
S, R
0x2C
Manchester 4 % clock deviation inverted at RX
T, C, F
0x29
no Manchester 4 % clock deviation inverted at
RX; transparent
6.5 Slicer configuration
The edge slicer is recommended for FSK modulation as shown in Figure 33
(SLICERSEL_D[5:4] set to 00). Registers 0x2B, 0x2C and 0x2D are set to 00.
019aab785
Fig 33. Slicer configuration
Table 29.
M-Bus slicer configuration register settings
M-Bus radio link
OL2381 register address
Information
RXDCON0 (0x2B) RXDCON1 (0x2C) RXDCON2 (0x2D)
S, T, C, R, F
AN11017
Application note
0x00
0x00
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
0x00
edge slicer
© NXP B.V. 2011. All rights reserved.
28 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
6.6 Expected modulation amplitude configuration
The expected peak modulation is configured to obtain the optimum receiver settings.
Register EMODAMPTH (see Figure 34) holds the expected peak deviation value
which is compared with the actual received baseband signal. Good results can be found if
calculated with an fdev of 70 %. If a higher bandwidth is required, set register EXPERT2
(see Section 6.2). The formula to calculate the expected modulation amplitude
configuration is then different.
Fig 34. Expected modulation amplitude configuration
max ( 15, x )
EDGE_MODAMP_TH_EXP = min ⎛ 15, log 2 ⎛ --------------------------- ⎞ ⎞
⎝
⎝
⎠ ⎠
7.75
(10)
x
+ 0.5 ⎞
EDGE_MODAMP_TH_MANT = min ⎛ 15, ---------------------------------------------------------⎝
⎠
EDGE_MODAMP_TH_EXP
2
(11)
Where:
fdev = desired modulation deviation
X = 33256 * fdev / 600 kHz (for S,T and C)
X = 33256 * fdev / 200 kHz (for R and F)
EDGE_MODAMPTH_TH_MANT = 1100b.
Table 30.
AN11017
Application note
M-Bus edge slicer configuration register settings
M-Bus radio OL2381 register address
link
EMODAMPTH (0x2A)
Information
S, T, C
0x7C
fdev(min) = 40 kHz, X = 2217, X70 % = 1552 ~ 12 × 27
R, F
0x68
fdev(min) = 4.8 kHz, X = 798, X70 % = 559 ~ 8 × 26
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
29 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
6.7 RX sequence
The following RX sequence (see Figure 35) is used in this example:
• WUPS (Wake-UP Search)
• Preamble detection (find synchronization word)
• Data reception
RX Command
= 01 (WUPS)
WUPS_FU_CF = 0
Stop
No
WUPS
Successful
During WUPS, the signal strenght will be
analysed, and LNA gain will be adjusted
Yes
WUPS_FU_CS = 10
PREA_FU_CF = 0
Stop
No
WUPS
Successful
During Preamble Detection the
synchronisation word is searched
Yes
Start DATA
Reception
019aab787
Fig 35. RX sequence
Remark: In this example, all signal monitors (see Section 6.8) are disabled. Therefore the
“stop condition” never occurs. However, the advantage of WUPS in this example is that
the LNA gain is selected automatically; see Section 6.1.
The previous sequence can be set with register RX_FOLLOWUP; see Figure 36.
019aab788
Fig 36. Register RX_FOLLOWUP
Table 31.
M-Bus RX_FOLLOWUP register settings
M-Bus radio link
OL2381 register address Information
RX_FOLLOWUP (0x36)
S, T, C, R, F
AN11017
Application note
0x8C
see Figure 35
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
30 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
6.8 Signal monitors
Signal monitors are not used in this example. Signal monitors can be used to analyze the
reception signal regarding strength, coding, and timing without involving the host
controller. The use of signal monitors is explained in application note Ref. 2.
019aab789
Fig 37. Signal monitors
Table 32.
M-Bus
radio link
M-Bus signal monitors register settings
OL2381 register address
SIGMON0 (0x2E) SIGMON1 (0x2F) SIGMON2 (0x30)
S, T, C, R, F 0x00
AN11017
Application note
Information
0x00
0x00
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
signal monitors not used
© NXP B.V. 2011. All rights reserved.
31 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
6.9 Preamble detection
The OL2381 has preamble pattern recognition. The value of the preamble
(synchronization word) is known in advance so the value of the preamble in the receiver is
configured according to this value. Five registers are used to configure the preamble; see
Figure 38. Register PREACON (address: 0x3A) configures the preamble length and the
number of chip errors allowed during preamble detection. The value of the preamble that
the receiver must recognize, is set in registers PREA0 to PREA3 (addresses: 0x3B to
0x3E).
019aab790
Fig 38. Preamble configuration registers
Table 33.
M-Bus preamble structure
M-Bus radio link
S, R
Preamble
Information
Header
Synchronization word
n × (01)
000111011010010110
n ≥ 15 or n ≥ 39 or n ≥ 279
T, C
n × (01)
0000111101
n ≥ 19
F
n × (01)
00011101010010110
n ≥ 39
Table 34.
M-Bus preamble length and value register settings
M-Bus radio OL2381 register addre
link
PREACON
PREA0 PREA1
S, R
Information
PREA2
PREA3
(0x3A)
(0x3B)
(0x3C)
(0x3D)
(0x3E)
0x12
0x96
0x76
0x54
0x55
length = 18, no chip errors
T, C
0x0A
0x3D
0x54
0x55
0x55
length = 10, no chip errors
F
0x11
0x96
0x3A
0xAA
0xAA
length = 17, no chip errors
To avoid too many fail recognitions due to noise, increase the value in register 0x3A.
Good results can be found by setting register 0x3A to a value of 0x14 (length = 20).
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
32 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
7. Activate transmit or receive operation
7.1 TX command
To enter the transmit mode, a transmit command is sent to OL2381 on the SPI line. It is
activated by sending the ninth clock edge (eight clock edges for D0 to D7and the ninth
clock for activating the transmitter). Table 35 shows the transmit command packet.
Table 35.
Transmit packet
D0
D1
D2
D4
D5
1
1
transmitter
frequency
selection bits
data and power
amplifier
synchronization bit
power amplifier Manchester
control bit
generation
bit
amplitude
selection
bit
1
1
0
0
0
0
Table 36.
D3
0
D6
D7
0
M-Bus transmit command
M-Bus radio link
OL2381 transmit command
Information
Address is the command
S, T, C, R, F
0xC0
frequency 0, FSK, no Manchester
Due to Manchester violations in the preamble, the host controller for links S and R must
create the Manchester data. Therefore, all wireless M-Bus modes must use the “no
Manchester” setup.
7.2 RX command
To enter the receive mode, a receive command is sent to OL2381 on the SPI line. It is
activated by sending the ninth clock edge (eight clock edges for D0 to D7, and the ninth
clock for activating the receiver). Table 37 shows the receive command packet.
Table 37.
Receive packet
D0
D1
D2
1
0
receiver frequency selection bits
WUPS/PRDA or data reception
gain setting
1
0
0
0
0
Table 38.
D3
0
D4
D5
1
D6
D7
1
M-Bus receive command
M-Bus radio link
OL2381 receive command
Information
Address is the command
S, T, C, R, F
AN11017
Application note
0x85
frequency 0, WUPS, automatic gain
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
33 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
7.3 RX current reduction
The current consumption of battery powered receivers is an issue. To prolong battery life,
the OL2381 implements several automatic functions, most of which run without the host
controller and with reduced current consumption.
An example of the following functions can be found in the general application note
AN11039; refer to Ref. 2
• Polling timer
The host controller and OL2381 are in Power-down mode. The OL2381 awakes
automatically at the desired time and goes into → WUPS mode. If no valid telegram is
recognized, it re-enters the Power-down mode. The use of signal monitors is
recommended to enable fast recognition. The host controller is not involved.
• WUPS
If OL2381 is awake, the signal is analyzed regarding strength, coding, and timing.
During this state, the gain of the LNA is set to HI_GAIN or LO_GAIN. If conditions are
satisfied, the OL2381 enters → preamble detection mode. If no conditions are set, the
OL2381 enters → preamble detection mode The host controller is not involved.
• Preamble detection
If the signal is in the correct range, the preamble is sought. If the preamble is found,
an interrupt starts the host controller. The OL2381 enters → data reception mode.
• Data reception
If preamble is found, the host controller obtains data from the OL2381.
Using this mechanism, the mean current consumption could be reduced. The reduction
depends mainly on the setup of the polling timer.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
34 of 43
xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxxxxxxxxxx xxxxxxxxxx xxx xxxxxx xxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxx
xxxxx xxxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxx xxxxxxx xxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx xxxxxxxxxxxxxx xxxxxx xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxx xxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxx xxxxx x x
100 nF
100 nF
100 nF
100 nF
100 pF
100 pF
100 pF
100 pF
100 pF
100 pF
VCC_PA
VCC_IF
VCC_DIG
VCC_RF
antenna
VCC_REG
GND
VCC_XO
1 μF
PIND
XTAL2
TEN
TEST1
RF
SWITCH
47 nF
TEST2
22 nF
TEST3
μC
OL2381
SDIO
SPI
DATA
100 pF
VREG_DIG
SEN
VREG_VCO
SCLK
VREG_PLL
DATA
VREG_PA
22 nF
47 nF
CLOCK
56 nH
100 kΩ
GND32
GND16
GND9
exposed die pad
100 kΩ
GND8
RF_IN
2.7 pF
5.1 nH
8.2 pF
1.8 pF
10 pF
56 pF
11 nH
Note:
This values depend on parasitics
See Application Note
019aab791
OPTIONAL
AN11017
35 of 43
© NXP B.V. 2011. All rights reserved.
Fig 39. OL2381 typical schematic for 868 MHz
Transceiver OL2381 using wireless M-BUS
SDO
100 kΩ
15 nH
RF_OUT
INT
GND1
Rev. 2 — 10 May 2011
All information provided in this document is subject to legal disclaimers.
XTAL1
RSTDIS
XTAL
NXP Semiconductors
100 nF
8. Hardware
AN11017
Application note
100 nF
VDD
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
Figure 39 shows a typical application schematic for the OL2381 operating in the 868 MHz
telemetry band.
Note the following:
• At layout, there must be one whole ground plane on the underside.
• A transitional ground plane must be below the RF signal path.
• All components that have a ground pin, must have a via to the ground plane as short
as possible.
• The resistors can be removed if the microcontroller always drives the inputs to a legal
state. Floating inputs can lead to increased current consumption.
• The inductance and capacitance values at the RF_IN and RF_OUT path depend on
the parasitic of the layout. To ensure a good RF performance, verify these values after
board layout.
• The capacitors connected to the VCC pins depend on the layout. The 100 pF capacitor
types must be as close as possible to the pin. If the pin has another 100 nF capacitor
nearby, some 100 nF capacitors can be removed.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
36 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
9. Software
Main
Interrupt
Initiate by edge of P12
Setup μC Interrupt (P12)
?
Write register OL2381
according Chapter 4-6
Action
Transmit
RxFlag
TxFlag
Read one Bit
from P10 into
buffer
Send one Bit
from buffer into
P10
Receive
Return
from Interrupt
Transmit
Receive
Write Data into Buffer
RxFlag=1
Send TxCommand to
OL2381 see Chapter 7.1
Send RxCommand to
OL2381 see Chapter 7.2
TxFlag=1
Wait
Wait
Int.
Int.
RxFlag=0
TxFlag=0
OL2381 Powerdown
OL2381 Powerdown
Read Data from Buffer
End
End
019aab792
Fig 40. Software example
Figure 40 shows an example of how the software can be configured to operate.
The blue blocks show the communication to OL2381 via the SPI interface; see Figure 39.
The yellow blocks represent data transfers to and from OL2381 via the data interface; see
Figure 39.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
37 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
If the hardware SPI is used, the ‘yellow function’ is not needed. Instead, the hardware
automatically reads bits in and sends bits out. The interrupt load shown in the application,
can be very high, so the use of a hardware SPI is especially recommended for the data
interface. For example, at a data rate of 100 kchip/s there is one interrupt every 10 μs.
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
38 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
10. Register configuration
Figure 41 to Figure 45 show configurations for S, T, C, R and F radio links.
;
x0 x1 x2 x3 x4
; visible in bank 0,1
01_0x = 60 26 b2 00 00
01_1x = 28 04 66 00 00
01_2x = 40 f0 15 00 78
01_3x = -- -- -- -- -; visible in bank 0
0_2x = -- -- -- -- -0_3x = 00 00 00 00 00
; visible in bank 1
1_2x = -- -- -- -- -1_3x = 00 02 49 02 00
x5 x6 x7 x8 x9 xa xb xc xd xe xf
00
01
00
--
00
ff
00
--
00
00
42
--
00
04
00
--
00
01
00
--
00
7a
99
--
00
00
00
--
20
1f
00
--
00
00
00
--
63
00
---
48
00
-00
-- -- -- -- -- -- -- -- -- 00 00
2c 8c 00 00 00 00 96 76 54 55 --- -- -- -- -- -- -- -- -- 80 00
60 00 00 00 00 00 00 00 00 00 –
019aab793
Fig 41. OL2381 register settings for S-mode
;
x0 x1 x2 x3 x4
; visible in bank 0,1
01_0x = 90 79 b2 00 00
01_1x = 28 04 66 00 00
01_2x = 40 f0 05 00 78
01_3x = -- -- -- -- -; visible in bank 0
0_2x = -- -- -- -- -0_3x = 00 00 00 00 00
; visible in bank 1
1_2x = -- -- -- -- -1_3x = 00 02 49 02 00
x5 x6 x7 x8 x9 xa xb xc xd xe xf
00
01
00
--
00
ff
00
--
00
00
41
--
00
04
00
--
00
01
00
--
00
7a
99
--
00
00
00
--
20
1f
00
--
00
00
00
--
cd
00
---
44
00
-00
-- -- -- -- -- -- -- -- -- 00 00
29 8c 00 00 00 00 3d 54 55 55 --- -- -- -- -- -- -- -- -- 80 00
60 00 00 00 00 00 00 00 00 00 -019aab794
Fig 42. OL2381 register settings for T-mode
;
x0 x1 x2 x3 x4
; visible in bank 0,1
01_0x = 30 c3 b2 00 00
01_1x = 28 04 66 00 00
01_2x = 40 f0 05 00 78
01_3x = -- -- -- -- -; visible in bank 0
0_2x = -- -- -- -- -0_3x = 00 00 00 00 00
; visible in bank 1
1_2x = -- -- -- -- -1_3x = 00 02 49 02 00
x5 x6 x7 x8 x9 xa xb xc xd xe xf
00
01
00
--
00
ff
00
--
00
00
41
--
00
04
00
--
00
01
00
--
00
7a
99
--
00
07
00
--
20
1f
00
--
00
00
00
--
cd
00
---
44
00
-00
-- -- -- -- -- -- -- -- -- 00 00
29 8c 00 00 00 00 3d 54 55 55 --- -- -- -- -- -- -- -- -- 80 00
60 00 00 00 00 00 00 00 00 00 -019aab795
Fig 43. OL2381 register settings for C-mode
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
39 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
;
x0 x1 x2 x3 x4
; visible in bank 0,1
01_0x = d0 03 b2 00 00
01_1x = 28 04 66 00 00
01_2x = 40 f0 55 00 78
01_3x = -- -- -- -- -; visible in bank 0
0_2x = -- -- -- -- -0_3x = 00 00 00 00 00
; visible in bank 1
1_2x = -- -- -- -- -1_3x = 00 02 49 02 00
x5 x6 x7 x8 x9 xa xb xc xd xe xf
00
01
00
--
00
ff
00
--
00
00
45
--
00
04
00
--
00
01
00
--
00
2c
68
--
00
00
00
--
20
1f
00
--
00
00
00
--
d5
00
---
61
00
-00
-- -- -- -- -- -- -- -- -- 00 00
2c 8c 00 00 00 00 96 76 54 55 --- -- -- -- -- -- -- -- -- 80 00
60 00 00 00 00 00 00 00 00 00 –
019aab796
Fig 44. OL2381 register settings for R-mode
;
x0 x1 x2 x3 x4
; visible in bank 0,1
01_0x = e0 d1 b1 00 00
01_1x = 28 05 66 00 00
01_2x = 40 f0 55 00 78
01_3x = -- -- -- -- -; visible in bank 0
0_2x = -- -- -- -- -0_3x = 00 00 00 00 00
; visible in bank 1
1_2x = -- -- -- -- -1_3x = 00 02 49 02 00
x5 x6 x7 x8 x9 xa xb xc xd xe xf
00
01
00
--
00
ff
00
--
00
00
46
--
00
04
00
--
00
01
00
--
00
17
68
--
00
00
00
--
20
1f
00
--
01
00
00
--
d5
00
---
69
00
-00
-- -- -- -- -- -- -- -- -- 00 00
29 8c 00 00 00 1a 96 3a aa aa --- -- -- -- -- -- -- -- -- 80 00
60 00 00 00 00 00 00 00 00 00 -019aab797
Fig 45. OL2381 register settings for F-mode
The OL2381 implements all calibrations automatically in these examples.
Take care when writing to addresses 0x0C, 0x18, bank 0 and 0x2F, 0x30, 0x34, 0x39
bank 1. These writes can start calibration processes or change calibration data. The best
solution is not to write to these addresses in simple applications.
In time-critical applications where the time between RX and TX is important, the
calibration can be skipped. In this case, the user must handle the calibration.
To obtain the repeatable register settings shown in Figure 41 to Figure 45, the following
steps are executed:
• write all OL2381 registers to 0x00
• reset OL2381 by writing 0x01 to register 0x13 (this puts most registers into the default
state, the remainder stay at 0x00)
• program the registers described in Section 4 to Section 6
AN11017
Application note
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
40 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
11. Abbreviations
Table 39.
Abbreviations
Acronym
Description
FSK
Frequency Shift-Keying
GFSK
Gaussian FSK
LNA
Low-Noise Amplifier
NRZ
Not Return to Zero
PLL
Phase-Locked Loop
RSSI
Residual Signal Strength Indicator
SPI
Serial Peripheral Interface
SRD
Short Range Device
VCO
Voltage Controlled Oscillator
WUPS
Wake-UP Search
12. References
AN11017
Application note
[1]
Data sheet — OL2381.
[2]
Application note — AN11039.
[3]
European Standard [EN 13757-4] — Working draft dated 2010-09-09.
[4]
Electromagnetic compatibility and Radio spectrum Matters (ERM) — ETSI EN
300 220.
[5]
European Standard [EN 13757-4] — Release date, June 2005.
[6]
URL — http://www.nxp.com/smartmetering.
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
41 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
13. Legal information
13.1 Definitions
Draft — The document is a draft version only. The content is still under
internal review and subject to formal approval, which may result in
modifications or additions. NXP Semiconductors does not give any
representations or warranties as to the accuracy or completeness of
information included herein and shall have no liability for the consequences of
use of such information.
13.2 Disclaimers
Limited warranty and liability — Information in this document is believed to
be accurate and reliable. However, NXP Semiconductors does not give any
representations or warranties, expressed or implied, as to the accuracy or
completeness of such information and shall have no liability for the
consequences of use of such information.
In no event shall NXP Semiconductors be liable for any indirect, incidental,
punitive, special or consequential damages (including - without limitation - lost
profits, lost savings, business interruption, costs related to the removal or
replacement of any products or rework charges) whether or not such
damages are based on tort (including negligence), warranty, breach of
contract or any other legal theory.
Notwithstanding any damages that customer might incur for any reason
whatsoever, NXP Semiconductors’ aggregate and cumulative liability towards
customer for the products described herein shall be limited in accordance
with the Terms and conditions of commercial sale of NXP Semiconductors.
Right to make changes — NXP Semiconductors reserves the right to make
changes to information published in this document, including without
limitation specifications and product descriptions, at any time and without
notice. This document supersedes and replaces all information supplied prior
to the publication hereof.
Suitability for use — NXP Semiconductors products are not designed,
authorized or warranted to be suitable for use in life support, life-critical or
safety-critical systems or equipment, nor in applications where failure or
malfunction of an NXP Semiconductors product can reasonably be expected
to result in personal injury, death or severe property or environmental
damage. NXP Semiconductors accepts no liability for inclusion and/or use of
NXP Semiconductors products in such equipment or applications and
therefore such inclusion and/or use is at the customer’s own risk.
Applications — Applications that are described herein for any of these
products are for illustrative purposes only. NXP Semiconductors makes no
representation or warranty that such applications will be suitable for the
specified use without further testing or modification.
Customers are responsible for the design and operation of their applications
and products using NXP Semiconductors products, and NXP Semiconductors
accepts no liability for any assistance with applications or customer product
AN11017
Application note
design. It is customer’s sole responsibility to determine whether the NXP
Semiconductors product is suitable and fit for the customer’s applications and
products planned, as well as for the planned application and use of
customer’s third party customer(s). Customers should provide appropriate
design and operating safeguards to minimize the risks associated with their
applications and products.
NXP Semiconductors does not accept any liability related to any default,
damage, costs or problem which is based on any weakness or default in the
customer’s applications or products, or the application or use by customer’s
third party customer(s). Customer is responsible for doing all necessary
testing for the customer’s applications and products using NXP
Semiconductors products in order to avoid a default of the applications and
the products or of the application or use by customer’s third party
customer(s). NXP does not accept any liability in this respect.
Export control — This document as well as the item(s) described herein
may be subject to export control regulations. Export might require a prior
authorization from national authorities.
Evaluation products — This product is provided on an “as is” and “with all
faults” basis for evaluation purposes only. NXP Semiconductors, its affiliates
and their suppliers expressly disclaim all warranties, whether express, implied
or statutory, including but not limited to the implied warranties of
non-infringement, merchantability and fitness for a particular purpose. The
entire risk as to the quality, or arising out of the use or performance, of this
product remains with customer.
In no event shall NXP Semiconductors, its affiliates or their suppliers be liable
to customer for any special, indirect, consequential, punitive or incidental
damages (including without limitation damages for loss of business, business
interruption, loss of use, loss of data or information, and the like) arising out
the use of or inability to use the product, whether or not based on tort
(including negligence), strict liability, breach of contract, breach of warranty or
any other theory, even if advised of the possibility of such damages.
Notwithstanding any damages that customer might incur for any reason
whatsoever (including without limitation, all damages referenced above and
all direct or general damages), the entire liability of NXP Semiconductors, its
affiliates and their suppliers and customer’s exclusive remedy for all of the
foregoing shall be limited to actual damages incurred by customer based on
reasonable reliance up to the greater of the amount actually paid by customer
for the product or five dollars (US$5.00). The foregoing limitations, exclusions
and disclaimers shall apply to the maximum extent permitted by applicable
law, even if any remedy fails of its essential purpose.
13.3 Trademarks
Notice: All referenced brands, product names, service names and trademarks
are the property of their respective owners.
All information provided in this document is subject to legal disclaimers.
Rev. 2 — 10 May 2011
© NXP B.V. 2011. All rights reserved.
42 of 43
AN11017
NXP Semiconductors
Transceiver OL2381 using wireless M-BUS
14. Contents
1
1.1
1.2
2
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9
2.10
2.11
3
4
4.1
4.2
4.3
4.4
4.4.1
4.4.2
4.4.3
5
5.1
5.2
5.3
6
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
6.9
7
7.1
7.2
7.3
8
9
10
11
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
OL2381 Block diagram . . . . . . . . . . . . . . . . . . . 4
Document overview . . . . . . . . . . . . . . . . . . . . . 5
Wireless M-BUS . . . . . . . . . . . . . . . . . . . . . . . . . 6
Wireless M-Bus mode S1 . . . . . . . . . . . . . . . . . 6
Wireless M-Bus mode S1-m . . . . . . . . . . . . . . . 7
Wireless M-Bus mode S2 . . . . . . . . . . . . . . . . . 7
Wireless M-Bus mode T1 . . . . . . . . . . . . . . . . . 8
Wireless M-Bus mode T2 . . . . . . . . . . . . . . . . . 8
Wireless M-Bus mode C1 . . . . . . . . . . . . . . . . . 9
Wireless M-Bus mode C2 . . . . . . . . . . . . . . . . . 9
Wireless M-Bus mode R2 . . . . . . . . . . . . . . . . 10
Wireless M-Bus mode F2a . . . . . . . . . . . . . . . 11
Wireless M-Bus mode F2b . . . . . . . . . . . . . . . 11
Wireless M-Bus mode N1, N2a-g . . . . . . . . . . 12
Physical layers . . . . . . . . . . . . . . . . . . . . . . . . . 13
General register settings . . . . . . . . . . . . . . . . 14
Frequency settings . . . . . . . . . . . . . . . . . . . . . 15
Baud rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
PLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Port configuration . . . . . . . . . . . . . . . . . . . . . . 18
Port PORTCON0 . . . . . . . . . . . . . . . . . . . . . . 18
Port PORTCON1 . . . . . . . . . . . . . . . . . . . . . . 19
Port PORTCON2 . . . . . . . . . . . . . . . . . . . . . . 19
TX register settings . . . . . . . . . . . . . . . . . . . . . 20
Power Amplifier (PA) configuration . . . . . . . . . 20
Modulation type and frequency deviation . . . . 22
Soft-FSK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
RX register settings . . . . . . . . . . . . . . . . . . . . . 24
LNA configuration . . . . . . . . . . . . . . . . . . . . . . 25
Channel bandwidth configuration . . . . . . . . . . 26
Baseband filter configuration . . . . . . . . . . . . . 27
Manchester decoder and clock recovery . . . . 28
Slicer configuration . . . . . . . . . . . . . . . . . . . . . 28
Expected modulation amplitude configuration 29
RX sequence . . . . . . . . . . . . . . . . . . . . . . . . . 30
Signal monitors . . . . . . . . . . . . . . . . . . . . . . . . 31
Preamble detection. . . . . . . . . . . . . . . . . . . . . 32
Activate transmit or receive operation . . . . . 33
TX command . . . . . . . . . . . . . . . . . . . . . . . . . 33
RX command . . . . . . . . . . . . . . . . . . . . . . . . . 33
RX current reduction. . . . . . . . . . . . . . . . . . . . 34
Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Register configuration. . . . . . . . . . . . . . . . . . . 39
Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . 41
12
13
13.1
13.2
13.3
14
References. . . . . . . . . . . . . . . . . . . . . . . . . . . .
Legal information . . . . . . . . . . . . . . . . . . . . . .
Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . .
Disclaimers . . . . . . . . . . . . . . . . . . . . . . . . . .
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
42
42
42
42
43
Please be aware that important notices concerning this document and the product(s)
described herein, have been included in section ‘Legal information’.
© NXP B.V. 2011.
All rights reserved.
For more information, please visit: http://www.nxp.com
For sales office addresses, please send an email to: [email protected]
Date of release: 10 May 2011
Document identifier: AN11017