CMOSTEK CMT2300AW Configuration Manuallines
Werbung
Werbung
AN149
AN149
CMT2300AW RF Parameter Configuration Guideline
Overview
This document introduces the RF parameter configuration, OOK and FSK modulation parameter configuration for CMT2300AW RFPDK.
The product models covered in this document are shown in the table below.
Part No.
CMT2300AW
Table 1. Product Models Covered in This Document
Frequency
127 - 1020MHz
Modem
(G)FSK/OOK
Function
Transceiver
Configuration
Register
Package
QFN16
Before reading this document, it is recommended to read AN142-CMT2300AW Quick Start Guideline to learn the basic usage of
CMT2300AW.
Copyright
©
By CMOSTEK Rev 1.0 | 1/12 www.cmostek.com
AN149
Table of Contents
Rev 1.0 | 2/12 www.cmostek.com
1 Tx and Rx Parameter Configuration
1.1 Basic Parameter Configuration
AN149
Figure 1. RF Parameter Configuration Interface
The registers corresponding to these parameters are stored in the frequency bank, the symbol rate bank, and the Tx bank, It needs to be calculated by complex calculation. The user does not need to understand the calculation process and the specific meaning of the register.
RFPDK interface parameters are easy to understand. The following configurations need attention.
How to set the Deviation:
Generally speaking, the following 3 points are recommended when configuring the Deviation:
1. 4kHz < Deviation < 200 kHz, and Symbol rate * 0.5 + Deviaiton<= 250 kHz
2. Symbol rate * 0.25 <= Deviation , that is, the modulation index must not be less than 0.5 (MSK).
3. In the case of meeting the above two conditions, if Symbol rate * 0.5 <= Deviation <= Symbol rate * 2, it can achieve the best sensitivity.
How to set the crystal PPM
The user inputs the crystal tolerance values for Tx and Rx respectively in RFPDK. If inputting +/-20 ppm respectively, it means that the worst case between the transmitter and receiver is the crystal frequency difference of 40 ppm. The user should consider the worst case to set these two tolerance values, which affect every bandwidth setting within the receiver.
Rev 1.0 | 3/12 www.cmostek.com
AN149
1.2 OOK Demodulation Configuration
Figure 2. OOK Configuration Parameter
Here is the configuration suggestion:
Table 2. OOK Parameter Configuration
Configuration Suggestion RFPDK Input
Parameter
Bandwidth
Demod Method
It is recommended to select Auto-Select
Middle Demodulation response speed is fast. The advantage is that the correct demodulation can be made immediately after each communication is started. The disadvantage is that if there is a spike mutation in the packet (a sudden abrupt increase in amplitude), it will affect the subsequent period of demodulation.
Average Demodulation response speed is slow. The disadvantage is that it takes time for each communication to demodulate correctly (usually 10-20 symbols). The advantage is that the demodulation effect will not be affected if there is a spike mutation in the packet (a sudden abrupt increase in amplitude).
The experience is that the spike mutation only exists in some special applications, so it is generally recommended that the demodulation method of Middle can speed up the demodulation and reduce the receiving time.
Long-Zero Number
The user needs to input this value to tell the receiver how many consecutive 0 there are at most in the packet. The receiver will modulate the relevant parameters to ensure the best demodulation results.
CDR Type
In the packet mode, the user needs to detect Preamble or Sync. The symbol rate clock recovery function has to be turned on, and the later chapter will describe how to use CDR in detail.
CDR Range
How to input Parameters when CDR = Tracing. The later chapter will describe how to use CDR in detail.
Rev 1.0 | 4/12 www.cmostek.com
AN149
1.3 FSK Demodulation Configuration
Figure 3. FSK Configuration Parameter
Here is the configuration suggestion.
Table 3. FSK Parameter Configuration
Configuration Suggestion RFPDK Input
Parameter
Bandwidth
AFC
AFC Method
CDR Type
CDR Range
Data
Representation
Recommend selecting the Auto-Select.
AFC switch. It is usually recommended to open.
AFC method. Recommend selecting the Auto-Select.
In the packet mode, the user needs to detect Preamble or Sync. The symbol rate clock recovery function has to be turned on, and the later chapter will describe how to use CDR in detail.
How to input parameters when CDR = Tracing. The later chapter will describe how to use CDR in detail.
Select the two frequencies of the (G)FSK, which represents 0 and which represents 1. The default configuration is usually selected.
Rev 1.0 | 5/12 www.cmostek.com
AN149
1.4 CDR Design Index and Mode Selection
The corresponding RFPDK interface and parameters are presented:
Figure 4. CDR Configuration Parameter
Here is the configuration suggestion:
Table 4. CDR Parameter Configuration
Register Bit RFPDK Parameter
CDR Type
CDR DR Range
Automatically select in conjunction with other configurations in
Register Bit
CDR_MODE<1:0>
CDR_RANGE_SEL<1:0>
CDR_DET_SEL
RFPDK. Users do not have to select.
Automatically select in conjunction with other configurations in
RFPDK. Users do not have to select.
Automatically select in conjunction with other configurations in
RFPDK. Users do not have to select.
Automatically select in conjunction with other configurations in
RFPDK. Users do not have to select.
Automatically select in conjunction with other configurations in
CDR_AVG_SEL<2:0>
CDR_3RD_EN
CDR_4TH_EN
RFPDK. Users do not have to select.
The contents and explanations of the register can be seen in the following table.
CDR_BR_TH<15:8>
Rev 1.0 | 6/12 www.cmostek.com
AN149
8.5
CUS_CDR1
(0x2B)
Table 5. CDR Related Register Instructions
Bit
6:4
R/W Bit Name
RW CDR_AVG_SEL<2:0>
Function Description
In Tracing mode, the average filter order of the
CDR output:
0 : 6/8
1 : 1/2
2 : 6/16
3 : 1/4
4 : 11/64
5 : 1/8
6 : 3/32
7 : 1/16
3:2 RW CDR_RANGE_SEL<1:0>
In Tracing mode, the maximum deviation range of the symbol length for the CDR: 0 : +/-6.3%
( Symbol rate range -5.9% to
+6.7% )
1 : +/-9.4% ( Symbol rate range -8.6% to
+10.4% )
2 : +/-12.5% ( Symbol rate range -11.1% to
+14.3% )
3 : +/-15.6% ( Symbol rate range -13.5% to
+18.5% )
1:0 RW CDR_MODE<1:0>
7
6
RW CDR_DET_SEL
RW CDR_3RD_EN
CDR working mode selection: 0 :
Tracing
1 : Counting 2 :
Manchester 3 :
No CDR
Details are given below.
In tracing mode, select the method to detect the symbol rate:
0 : Method 0
1 : Method 1
The default selection is method 1.
In tracing mode, enable the symbol rate detection when the consecutive three symbols do not skip:
0 : Disable
1 : Enable
Rev 1.0 | 7/12 www.cmostek.com
CUS_CDR2
(0x2C)
5 RW CDR_4TH_EN
CUS_CDR3
(0x2D)
CUS_CDR4
(0x2E)
7:0 RW CDR_BR_TH<7:0>
7:0 RW CDR_BR_TH<15:8>
AN149
In tracing mode, enable the symbol rate detection when the consecutive four symbols do not skip:
0 : Disable
1 : Enable
In tracing mode, it is a threshold that CDR needs to use. The calculation method is: TH = crystal frequency
/ symbol rate. For example, the crystal frequency is
26MHz when the symbol rate is 15 kHz, and the result is 1733 after rounding.
CMT2300AW clock recovery related parameters are stored in the symbol rate bank, automatically configured through the RFPDK. If users do not have special requirements, they do not need to understand the contents of the register described above. Here we introduce the design index and mode selection method of clock recovery. Hereinafter the clock recovery will be abbreciated as CDR.
The basic task of a CDR system is to recover the clock signal that is synchronized with the symbol rate, while receiving the data.
Not only for decoding inside the chip, but also for outputting to GPIO for users to sample the data. So CDR's task is simple and important. If the recovered clock frequency is in error with the actual symbol rate, it will cause data acquisition errors, error codes, and decoding errors at the time of reception.
In fact, the application environment is not ideal. Generally speaking, there are two situations when the system works.
1. The symbol rates for TX and RX are accurate, or the error is a few hundred thousandths or a few ten thousandths. This is often because the TX and RX configuration and the mechanism of computing the symbol rate are more advanced, such as using a variety of high-end TRX products.
2. The symbol rates of TX and RX are greatly deviation, such as a few thousandths to a few percent.
At the same time, CDR has three important indicators:
1. How long data can be correctly collected in the case of no data flipping (that is always receiving 0 or receiving 1.)?
2. What is the symbol rate deviation between TX and RX?
3. Can the sensitivity be improved? Can the error code be reduced?
Overall considering the two applications and the three indicators, CMT2300AW has designed three sets of CDR systems, as follows:
1. COUNTING system
–The system is designed for the symbol rates to be more accurate. If the symbol rate is 100% aligned, the unlimited length of 0 can be received continuously without error. But if there is a deviation, the deviation will have a cumulative effect when the data is not flipped. For example, a symbol deviation of 5%, then 10 consecutive symbols without flipping, the deviation will accumulate over 50%.
This can lead to a sampling error. The reason is the same as the traditional
UART transmission. Once the signal is flipped, the deviation will be cleared and a new accumulation will be began. So, when the deviation is very small, such as 1/5000, then you can continuously receive 2500 symbols without flipping data without error. The performance is very good.
2. TRACING system –The system is designed for the symbol rate deviation. It has the tracking function. It can automatically detect the symbol rate transmitted by TX, and adjust quickly the local symbol rate of RX at the same time, so as to minimize
Rev 1.0 | 8/12 www.cmostek.com
AN149 the error between them. The system can withstand up to 15.6%. Other similar products in the industry cannot reach this level. On the other hand, the effect of this system depends on the accuracy of the local symbol rate adjustment. Because the crystal frequency is fixed at 26MHz, the higher the symbol rate, the lower the accuracy of the adjustment, Generally speaking, the accuracy will be higher if the symbol rate is below 50 kHz. It can receive more continuous no flipping data without error. That is, the lower the symbol rate, the more the correct sampling of data, the actual symbol depends on the actual measurement. If the symbol rate is above 50 kHz, the amount of no flipping data that can be sampled correctly will become less and less. If the symbol rate is 250 kHz, it is possible to only correctly sample 2-3 bytes without flipping data because of the low accuracy.
3. MANCHESTER system –This system is changed by the COUNTER system. The basic feature is the same. The only difference is that the system is specially designed for Manchester codec, Special processing can be done when the TX symbol rate has unexpected changes. A common mutation is that TX data sometimes has two consecutive 0 or 1 patterns after being encoded by Mann Chester, If one of the 0 or 1 symbol length suddenly grows longer than 50%, then the RX may sample three 0 or 1. If the symbol length suddenly becomes shorter more than 50%, RX will only sample one 0 or 1. In order to answer such a special situation, in this clock recovery system, the sampling will stop if 3 or more symbols without flipping are detected in the received data. This avoids the error when the symbol suddenly grows. What happens if the symbol length suddenly becomes shorter? Because this situation is often common in the current application, users can uniformly speed up the symbol rate of RX. The amount of symbol can be correctly sampled when the symbol length is shorter than 50%.
How to select the suitable CDR system:
RFPDK will select the system according to the configuration of the symbol rate. When the symbol rate is less than or equal to 50 kHz, the TRACING system is selected. The system can not only realize the tracking, but also correctly sample the long data without flipping. When the symbol rate is greater than 50 kHz, less than 200 kHz, it can be set according to the actual need of users. If users tend to accept the large symbol rate error, users can use the TRACING system. If users tend to accept the long data without flipping, users can use the COUNTING system. When the symbol rate is greater than 200 kHz, TRACING performs better than COUNTING. When the entire packet conforms to the Manchester coding rule (i.e., no more than 2 consecutive symbols without flipping), and finds the symbol rate mutation in the application, MANCHESTER system can be considered.
In addition, no matter which type of CDR system is adopted, it will improve the sensitivity of the 1-2dB than receiving the RAW data after the system is turned on.
How to debug the TRACING parameter:
Tracing's tracking function is done every time when the data is flipped. So the ideal situation is that each symbol will make an adjustment when the packet has preamble. This will speed up the tracking speed.
The following introduces the debugging methods for several parameters.
CDR_RANGE_SEL<1:0>
This parameter selects the symbol rate deviation that can be tracked. The percentage given in the register content is not the percentage of the symbol rate, but it’s the percentage of the symbol length, For example, the symbol rate is 10 kHz, a symbol length is 100 ns, then +/-15.6% is refers to the TX symbol length is in the range of 84.4 ns to 115.6 ns, RX can detect the symbol and adjust its length to close to TX, so as to eliminate the deviation of the symbol rate. If it is converted to a percentage of the symbol rate, then +15.6% length percentage can be converted to -13.5% symbol rate percentage, and -15.6% can be converted to
+18.5%.
The user might ask why not directly select the maximum range of tracking. This is because the larger the tracking range, the harder it is to track, and the more time it takes. Therefore, it is recommended that the user select the most appropriate range according to the actual application requirement.
Rev 1.0 | 9/12 www.cmostek.com
AN149
CDR_3RD_EN, CDR_4TH_EN
The two parameters are tied to the choice of CDR_RANGE_SEL<1:0>. When +/-15.6% is selected, none of them can be enabled.
When +/-12.5% is selected, CDR_4TH_EN cannot be enabled. The rest can be enabled. It's not explained in detail here
CDR_AVG_SEL<2:0>
The smaller the filter coefficient is, the narrower the bandwidth is, the slower the symbol rate tracking speed is, and the smoother the output is. The larger the filter coefficient is, the wider the bandwidth is, the faster the symbol rate tracking speed is, and the easier the output jitter, that's similar to how PLL works.
Usually we hope the tracking speed as fast as possible (for example, completed during several symbols in front of preamble), also hope to output stability, otherwise it is easy to cause the error later, and especially there are more long continuous 0 or 1. Therefore, if the user wants to adjust this parameter himself, it is necessary to debug the effect according to the actual situation.
In addition, generally speaking, the higher the symbol rate, the more jitter will be. The smaller the filter coefficient is, the higher the receiving accuracy of the continuous long 0 and 1. At the same time, there is an acceptable tradeoff and choice whether to slow down the tracking speed.
1.5 Register Classification and Use in the Tx Bank
Usually, the register of the Tx bank is entirely generated by the RFPDK, It is OK that the user configures once in the chip initialization phase. Then, considering that some users will individually modify the Tx power, symbol rate and other parameters in the application process, the Tx bank can be further classified and divided so that users can configure the target accordingly.
The following table shows different bands in different color:
Color
White
Gray
Green
Blue
Figure 5. Tx Related Register Classification
Table 6. Tx Related Register Classification
Function Description
Set switches or options for various Tx functions.
Set the Deviation in FSK mode.
Set the Ramp parameter. It is related to the symbol rate. That is, each time users change the TX symbol rate, users must configure the bank again.
Set Tx power and LBD power compensation , where the contents of
LBD_COMP_OFFSET<2:0> cannot be fully relied on RFPDK, because it is closely related to the application environment, which will be described in detail below.
Yellow LBD threshold usage, please refer to the related content of "Low Battery
Detection (LBD)" in the next chapter.
The user does not need to know the contents of the register, and can configure the target accordingly, minimizing the number of registers to write.
Rev 1.0 | 10/12 www.cmostek.com
AN149
2 Revise History
Version No.
0.8
0.9
1.0
Chapter
All
All
All
Table 7. Revise History Records
Description
Initial release
Add the advice to read AN142; Modify individual typos
Update RFPDK screenshot to keep consistent with the latest software
Date
2017-03-24
2017-07-12
2020-05-22
Rev 1.0 | 11/12 www.cmostek.com
3 Contacts
CMOSTEK Microelectronics Co., Ltd. Shenzhen Branch
Address: 2/F Building 3, Pingshan Private Enterprise S.T. Park, Xili, Nanshan District, Shenzhen, Guangdong, China
Tel: +86-755-83231427
Post Code: 518071
Sales: [email protected]
Supports: [email protected]
Website: www.cmostek.com
AN149
Copyright. CMOSTEK Microelectronics Co., Ltd. All rights are reserved.
The information furnished by CMOSTEK is believed to be accurate and reliable. However, no responsibility is assumed for inaccuracies and specifications within this document are subject to change without notice. The material contained herein is the exclusive property of CMOSTEK and shall not be distributed, reproduced, or disclosed in whole or in part without prior written permission of CMOSTEK. CMOSTEK products are not authorized for use as critical components in life support devices or systems without express written approval of CMOSTEK. The CMOSTEK logo is a registered trademark of
CMOSTEK Microelectronics Co., Ltd. All other names are the property of their respective owners.
Rev 1.0 | 12/12 www.cmostek.com
Herunterladen
Werbung