跳到主要内容

WS RTL8723D COB MP FLOW R04

:::info 文档信息

页数:57 · 语言:英文

原始文档:00014010-WS-170731-RTL8723D_COB_MP_FLOW_R04.pdf

:::

在线预览​

若预览无法显示,请直接下载 PDF 后用本地阅读器打开。


RTL8723DE​

RTL8723DU​

RTL8723DS​

COB​

MP FLOW​

R04​

This document is subject to change without notice. The document contains Realtek confidential information and must not be disclosed to any third party without appropriate NDA. Revision History:

RevisionDateChangesAuthor
R012017/07/03First ReleaseWinnita.Zhao
R022017/07/26Modify 2.3.1Winnita.Zhao
R032017/07/31Add Chap6(K-FREE FLOW)Winnita.Zhao
R042017/10/20ReformatsWinnita.Zhao

1. Test Platform​

The calibration flow described in following section is based on WiFi tester. The tester qualified by Realtek is listed below:

Include 802.11ac TestOnly 802.11a/b/g/n Test
VendorModal NameVendorModal Name
LitePointIQxelLitePointIQFlex
ItestWT-200LitePointIQView
NIPXIe-5644R/5645RLitePointIQnxn
AnritsuMT8870AAgilentk N4010A
AeroflexPXI 3000 Series

The test environment setup is as below:

instrument control interface

shielding box WiFi/Bluetooth tester 10dB-fixed DUT control Splitter attenuator A interface DUT Control PC B

Figure 1: Brief diagram about test environment setup of DUT

Note the 10dB-fixed attenuator has to set as close as possible to DUT since it will reduce the mismatch effect between DUT and the environment.

2. DUT MP Flow​

Below diagram shows a global view of mass production flow, please refer to following sub-section to get detailed description for each step.

success success

Verify Tx Performance Step Start Test Initial Step Calibration Step

failure failure failure

FAIL success failure failure Write Data to Storage and Verify Rx Performance Step PASS Check Contents success success

Figure 2: Brief diagram about MP flow

2.1.Environment Setup​

Step1: Use USB connect PC and Android/Linux device, as shown Figure 3.

Connect with USB

Figure 3: Connect PC to Android/Linux device

Step2: Use adb command as below:

adb devices

to check Android/Linux device to connect or not. If Android/Linux device connect successfully, screen show as Figure 4.

Device Number
Device Number

Figure 4: Check computer connect to Android/Linux device

Step3: Use adb command as below:

adb shell

to enter Android/Linux device command line, as shown Figure 5.

Figure 5: Enter Android/Linux device command line

2.2.WiFi Initial Step​

The initial WiFi step as shown in Figure 6:

success WiFi Initial Step Done Initialized

failure

FAIL

Figure 6: Brief diagram about initial WiFi step

2.2.1. Initial WiFi Refer to Section 2.1, you can connect PC and Android/Linux device, The relative control commands about initializing WiFi DUT. The main command is Android use rtwpriv command. Linux use rtwpriv command. EX: Android system: rtwpriv wlan0 mp_start Linux system : rtwpriv wlan0 mp_start The following command is an example for Linux

remount root

rmmod wlan
insmod wlan.ko

(delay 5 second) ifconfig wlan0 up rtwpriv wlan0 mp_start

2.3.WiFi Calibration Step​

This step includes 2 sub-steps as shown in Figure 7:

WiFi Calibrates WiFi Calibrates success success Done Calibration Crystal Cap. Tx Power Index

failure failure

FAIL

Figure 7: Brief diagram about WiFi calibration step

2.3.1. WiFi Calibrates Crystal Cap.

2.3.1.1. EFuse definition about Crystal Cap. First, take a look at eFuse content about setting of Crystal Cap. . Normal driver will load this value in initial step. So this value must be well-calibrated and filled on correct eFuse location.

Crystal Calibration 0xB9[5:0] Table 1: Crystal calibration offset in eFuse 2.3.1.2. Calibrated Crystal Cap. Flow

Set Index = Measure Carrier Start to Find Index Set Single-Tone Tx InitIndex Frequency (Hz)

Abs. Value of No Set Index = Index + (TargetCFOffset - MeasuredCFOffset) / Step MeasuredCFOffset < 2ppm

YES

Have Found Index

Figure 8: Finding Crystal Cap. Index Flow

InitIndex: the default value is 0x20. Index range is 0x0 to 0x3F. MeasuredCFOffset: Carrier frequency measured by instrument - Ideal Carrier Frequency Target range Abs. Value of 2ppm in 2.4GHz band is about 10KHz(±5KHz). TargetCFOffset: generally is 0 ppm Step: This value is dependent of different module dominated by external capacitor beside the crystal, so it needs to modify easily in initial file of test program. Usually, the value is about +2 ~ +3KHz by experience. The suitable value should be checked by Hardware RD and fill it in the setup file of test program. The plus symbol means that the crystal cap. index and carrier frequency is positive-dependent (The larger index is relative to major carrier frequency).

Single tone command is as below: Step 1: rtwpriv wlan0 mp_ant_tx a rtwpriv wlan0 mp_channel 7 rtwpriv wlan0 mp_txpower patha=0,pathb=0 rtwpriv wlan0 mp_phypara xcap=32 rtwpriv wlan0 mp_ctx background,stone Step 2: You can measure Frequency Error(ppm) Freq_Err. If Freq_Erris is between ±2ppm,you found this value (index_cry_ok) correctly. If Freq_Erris is not between ±2ppm, you caught use algorithm as below to find next index_cry_next until you find Freq_Err between ±2ppm.

 _ Err Freq index_cry_next= Index_cry -

ex: We set Index_cry =32, measure Freq_Err = -23.49ppm,

  ) . ( The next index is index_cry_next= 32- ≒55

step3: The index_cry_next must be rounded the number to the integer, and use command to update index as follows:

rtwpriv wlan0 mp_phypara xcap index_cry_next ex: rtwpriv wlan0 mp_phypara xcap 55

Repeat Step2, Step3 until find Freq_Erris correctly and note down Index_cry_ok.

Stop sing tone command is as below:

rtwpriv wlan0 mp_ctx stop 2.3.2. WiFi Calibrates Tx Power Index

2.3.2.1. EFuse definition about Tx power index and thermal meter First, take a look at eFuse content about setting of RF Tx gain index. Normal driver will load bellow Tx gain setting for each channel group or each PHY data rate. So these Tx gain setting must be well-calibrated and filled on correct eFuse location.

Power Index Location in EFuse of Antenna S1
Group 1 CH1 – CH2Group 2 CH3 – CH5Group 3 CH6 – CH8Group 4 CH9 – CH11k Group 5 CH12 – CH13Group 6 CH14
MCS7 B400x16[7:0]0x17[7:0]0x18[7:0]0x19[7:0]0x1A[7:0]
CCK0x10[7:0]0x11[7:0]0x12[7:0]e 0x13[7:0]0x14[7:0]0x15[7:0]
Power Index Location in EFuse of Antenna S0
Group 1 CH1 – CH2Group 2 CH3 – CH5Group 3 CH6 – CH8t Group 4 CH9 – CH11Group 5 CH12 – CH13Group 6 CH14
MCS7 B400x40[7:0]0x41[7:0]l 0x42[7:0]0x43[7:0]0x44[7:0]
CCK0x3A[7:0]0x3B[7:0]0x3C[7:0]0x3D[7:0]0x3E[7:0]0x3F[7:0]
Power Difference Location in EFuse of Antenna S1
2G Band54M-1T to MCS7-B400x1B[3:0]
e MCS7-B20 to MCS7-B400x1B[7:4]
R Power Difference Location in EFuse of Antenna S0
2G Band54M-1T to MCS7-B400x45[3:0]
MCS7-B20 to MCS7-B400x45[7:4]

Thermal Meter 0xBA[7:0]

Table 2: Tx gain index and thermal meter offset in eFuse 2.3.2.2. Define target power According to EMI/EMC regulatory IEEE TX EVM / Spectrum Mask requirement Then you can define your target power for each channel group and also each PHY data rate. The recommended target power is listed below and assumes all channel have the same target power for each PHY data rate.

Data RateMCS7-B40MCS7-B2054MCCK
Target Power 2G13dBm13dBm14dBmk 16dBm

Table 3: The default target power 2.3.2.3. Tx calibration flow Theoretically, we need to measure all value defined above in eFuse to calibrate the Tx power level. But since it needs too much time, we only measure several channels with MCS7-B40 signal and figure out the other non-measured value by some easy mathematics method. Usually, the recommended measured channels are listed below:

2G Band
CH4CH10

Table 4: The recommended measured channel for Tx power calibration

The flow is shown as below:

Start Calibration

Find the index relative to the Set Set power level. Above Channels Data Rate = MCS7-B40 The found index is sequentially Index_MCS7_B40

Have not measured all Have measured Set channels in one antenna all channels in Antenna = A AntA

Read Thermal Value

Figure 9: Tx calibration flow

Each finding index flow is shown as below: Set Index Start to Set Packet Tx Measure Power (dBm) = InitIndex Find Index

No Set Index TargetPower - 0.5 < MeasuredPower < TargetPower + 0.5 = Index + (TargetPower - MeasuredPower) * 2

Yes

Find Index

Figure 10: Finding index flow While finding Index_MCS7_B40, the Init Index is defined by user or programmer and target power is MCS7-B40 target power level defined before.

After finding all Index_MCS7_B40, use these values to get all Tx gain index in each channel set by interpolation. As 2G channels for example, if the measured index in CH4 is 41 and the measured index in CH10 is 43, all 2G group MCS7-B40 index is shown as below:

Group 1Group 2t Group 3Group 4Group 5
40 (Calculated by Interpolation)41 (Measured)l 42 (Calculated by Interpolation)43 (Measured)44 (Calculated by Interpolation)

Table 5: The example of finding index in 2G band by interpolation

We have measured all groups of 5G band 1 and 5G band 2, so just only use the interpolation for 5G band 3 and 5G band4. The 2G CCK index will be a fix offset to MCS7-B40 dependent on CCK and MCS7-B40 target power difference and input baseband signal amplitude. So it also needs to be checked by RD and fill it to the setup file of test program. If we define a CCK offset value as CCK_Offset, the CCK index in above measured example will be shown as below:

Group 1Group 2Group 3Group 4Group 5Group 6
40 + CCK Offset _41 + CCK Offset _42 + CCK Offset _43 + CCK Offset _44 + CCK Offset _45 + CCK Offset _

Table 6: The example of finding CCK index

The all power difference values are between +7 and -8. The value 0x0 ~ 0x7 in eFuse means 0 ~ +7 and the value 0x8 ~ 0xF in eFuse means -8 ~ -1. The +1 power difference will plus 0.5dBm power theoretically, so we calculate all power difference by the defined target power. We take Table 7 as an example, the 2G power difference is shown as below:

MCS7-B20 to MCS7-B40(MCS7-B20 Tatget Power - MCS7-B40 Tatget Power)x2 _ _ _ _ = ((13 – 13) x2) = 0
54M-1T to MCS7-B40(54M Tatget Power - MCS7-B40 Tatget Power)x2 _ _ _ _ = ((14 – 13) x2) = 2

Table 7: The example of finding power difference

For example: Step 1: You must offset cable loss by yourself. Ex: Rate MCS7, Bandwidth40, Channel 4 , Tx ant =S1, Tx_target = 13dBm, Tx power index=42, find Index_MCS7_B40_Group2 The command is shown as below: rtwpriv wlan0 mp_ant_tx a

// set ant S1(S1:a; S0:b)

rtwpriv wlan0 mp_bandwidth 40M=1,shortGI=0 //set bandwidth 40M, short GI off rtwpriv wlan0 mp_channel 4

//set Channel 4

rtwpriv wlan0 mp_rate 135

//set OFDM data rate MCS7

rtwpriv wlan0 mp_txpower patha=42,pathb=0 //set Tx power index 42 (For 8723D, no matter S1 or S0, use patha) rtwpriv wlan0 mp_ctx background,pkt

//start continuous Tx

After finish measuring, use command as below to stop Tx. rtwpriv wlan0 mp_ctx stop

//stop continuous Tx

Step 2: After you finish measuring, you can get power. If power is between (13 dBm±0.5 dBm),you found this power index(Index_MCS7_B40_Group2=42) correctly. If power is not between (13dBm±0.5 dBm) you caught use algorithm as below to find next Index_MCS7_B40_Group2 until power is between (13 dBm±0.5 dBm).

 ) measure _ arg _ ( Tx et t Tx Index_MCS7_B40_ Group2_next = Index_MCS7_B40_ Group2+ .

ex: Measuring power is 11.6 dBm  ) . ( Index_MCS7_B40_ Group2_next = 42 + ≒ 45 (The value must be rounded the . number to the integer)

Rate MCS7, Bandwidth40, Channel 4 , Tx_target = 13dBm, Tx power index=45, find Index_MCS7_B40_Group2 rtwpriv wlan0 mp_bandwidth 40M=1,shortGI=0 //set bandwidth 40M, short GI off rtwpriv wlan0 mp_channel 4

//set Channel 4

rtwpriv wlan0 mp_rate 135

//set rate MCS7

rtwpriv wlan0 mp_txpower patha=45,pathb=0 //set Tx power index 42, ant A rtwpriv wlan0 mp_ctx background,pkt

//start continuous Tx

After finish measuring, use command as below to stop Tx. rtwpriv wlan0 mp_ctx stop

//stop continuous Tx

Repeat Step1, Step2 until find measuring power correctly and note down Index_MCS7_B40_Group2. 2.3.2.4. Read Thermal Meter Normal driver will load thermal meter to do power tracking. So this value must be filled on correct eFuse location. Use MP API function below to get thermal meter value:

rtwpriv wlan0 mp_ther

You get value response to Android/Linux device, and note down thermal meter value.

ex: wlan0 mp_ther:14

2.4.Bluetooth Calibrates Tx Power Index by Non-Signaling mode​

2.4.1. Efuse definition about Tx power index First, take a look at eFuse (config file) content about setting of power index and channel adjust value . Normal driver will load this value in initial step. So this value must be well-calibrated and filled on correct eFuse location

Efuse OffsetExplanation
0x15A[7:0]ALL MAX Power Index
0x15B[7:0]k 1M Default Power Index
0x15C[7:0]2M Default Power Index
0x15D[7:0]3M Default Power Index
0x15E[7:0]e LE Default Power Index
0x15F[7:0]0x01

Table 8: Tx power index offset in eFuse 2.4.2. Tx Calibration Flow Usually, the recommended measured channels are listed below:

Test ChannelPacket TypeBluetooth Spec.
Ch 62408MHzDH1> 0 dBm

Table 9: The recommended measured channel for Tx power calibration

Calibration output Tx power index flow is as below

Get default tx power index Begin

t_index​

begin single tone tx

m_power​

Measure the tx power

Stop single tone tx

d_index= Calculated to be set tx power ceil( t_power-m_power). index

NO

d_index ==0

Yes

PG the new power index to end eFuse of device

Figure 11: Calibration output tx power index flow

t_index: The default tx power index . It can be known by the command of mp tool. m_power: Measured tx power. t_power: Target tx power, ex. 4.5dbm d_index: Define d_index = floor( t_power - m_power ).

EX: if t_power - m_power = 0.2 , d_index = 0;
if t_power - m_power = -0.5, d_index =-1;
if t_power - m_power = -1.2, d_index=-2;

TX output power calibration step by step index is defined below: First , target Tx power is t_power .The target Tx power index can be defined by the customer . Step1): Get default tx power index, the index is t_index. Customers can get the default value by the HCI command. Please refer to Section 3.3.3 Step2): Begin single tone tx in channel 0(2402MHz). Step3): Measure the Tx power , the Tx power is m_power. Then to stop single tone Tx. Step4): Calculated the Tx power index gap. d_index = floor( t_power - m_power). Step5): To set new tx power index . The new index t_index defined as:

t_index = t_index + d_index;

8723D Bluetooth Power Index Step is 1.0 dBm. Step6): PG the new power index t_index to eFuse of device. Step7): Re-begin single tone tx in channel 0. (Double confirm the Tx power ) Step8): Measure the Tx power Step9): Stop single tone tx

EX: Note: The chip is RTL8723DS . The power index step is 1.0 dBm. The Target tx power t_power is 4.5 dbm and the default tx power index t_index is 26 . t_power = 4.5 dbm t_index = 26.

Step1) Measure the tx power Begin single tone tx > Measure the tx power m_power = 3.4 dbm stop single tone tx Then d_index = floor(4.5 - 3.4) = floor(1.1) = 1

Step2) Calculate new tx power index t_index = t_index + d_index = 26 + 1 = 27 .

Step3) Write the new tx power index 27 to efuse or config file.

Step4) verify Tx power . Begin single tone tx  Measure the tx power m_power = 4.4 dbm  stop single tone tx

3. TRx Verify Performance Step​

3.1.Verify WiFi Performance Step​

3.1.1. Verify WiFi Tx Performance Use the calibrated index in previous step and measure Tx power, EVM, frequency offset and LO leakage to check Tx performance is ok or not. The recommended test items are listed below:

Data RateAntennaChannelItemCriterion
MCS7-B4 0Antenna S1 Antenna S0CH10Powerk Typical: 13dBm, Acceptable Range: +1/-1.5dB
EVM< -28dB
Freq. Err.e ±15ppm
Leakage< -20dBtotal
MaskIEEE spec. defined
MCS7-B2 0Antenna S1 Antenna S0a CH10Powert Typical: 13dBm, Acceptable Range: +1/-1.5dB
l EVM< -27dB
Freq. Err.±15ppm
Leakage< -20dBtotal
MaskIEEE spec. defined
R OFDM 54Me Antenna S1 Antenna S0CH1PowerTypical: 14dBm, Acceptable Range: +1/-1.5dB
EVM< -25dB
Freq. Err.±15ppm
Leakage< -15dBtotal
MaskIEEE spec. defined
CCK 11MAntenna S1 Antenna S0CH7PowerTypical: 16dBm, Acceptable Range: +1/-1.5dB
EVM< 8%
Freq. Err.±15ppm
MaskIEEE spec. defined

Table 10: The recommended test items of WiFi Tx Please refer to Section 2.3.2.3, you can calculate the following index information:

Index_MCS7_B20_Group1 = Index_MCS7_B40_Group1 + (MCS7-B20 to MCS7-B40) Index_MCS7_B20_Group2 = Index_MCS7_B40_Group2 + (MCS7-B20 to MCS7-B40) Index_MCS7_B20_Group3 = Index_MCS7_B40_Group3 + (MCS7-B20 to MCS7-B40) Index_MCS7_B20_Group4 = Index_MCS7_B40_Group4 + (MCS7-B20 to MCS7-B40) Index_MCS7_B20_Group5 = Index_MCS7_B40_Group5 + (MCS7-B20 to MCS7-B40)

Index_OFDM_Group1= Index_MCS7_B40_Group1 + (54M-1T to MCS7-B40) Index_OFDM_Group2= Index_MCS7_B40_Group2 + (54M-1T to MCS7-B40) Index_OFDM_Group3= Index_MCS7_B40_Group3 + (54M-1T to MCS7-B40) Index_OFDM_Group4= Index_MCS7_B40_Group4 + (54M-1T to MCS7-B40) Index_OFDM_Group5= Index_MCS7_B40_Group5 + (54M-1T to MCS7-B40)

For example: You want to verify WiFi Tx Performance and you can follow step as below.

Step 1: Initial WiFi Step Please refer to Section 2.2.1

Step 2: start Tx Ex: Rate MCS7, Bandwidth40, Channel 4 , Tx_target = 13dBm, Index_MCS7_B40_Group2 = 42(the value is from map)

rtwpriv wlan0 mp_bandwidth 40M=1,shortGI=0 rtwpriv wlan0 mp_channel 4 rtwpriv wlan0 mp_rate 135 rtwpriv wlan0 mp_txpower patha=42,pathb=0 rtwpriv wlan0 mp_ctx background,pkt

After finish measuring, use command as below to stop Tx. rtwpriv wlan0 mp_ctx stop

//stop continuous Tx

Ex: Rate MCS7, Bandwidth20, Channel 4 , Tx_target = 13dBm, Index_MCS7_B20_Group2 = 42(the value is from map (Index_MCS7_B20_Group2 = Index_MCS7_B40_Group2 + (MCS7-B20 to MCS7-B40))

rtwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 rtwpriv wlan0 mp_channel 4 rtwpriv wlan0 mp_rate 135 rtwpriv wlan0 mp_txpower patha=42,pathb=0 rtwpriv wlan0 mp_ctx background,pkt

After finish measuring, use command as below to stop Tx. rtwpriv wlan0 mp_ctx stop

//stop continuous Tx

Ex: Rate OFDM54, Bandwidth20, Channel 10 , Tx_target = 13dBm, Index_OFDM_B20_Group4 = 42(the value is from map(Index_OFDM_Group4= Index_MCS7_B40_Group4 + (54M-1T to MCS7-B40))

rtwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 rtwpriv wlan0 mp_channel 10 rtwpriv wlan0 mp_rate 108 rtwpriv wlan0 mp_txpower patha=42,pathb=0 rtwpriv wlan0 mp_ctx background,pkt

After finish measuring, use command as below to stop Tx. rtwpriv wlan0 mp_ctx stop

//stop continuous Tx

PS: Data Rate ID: [CCK: 1 M 2 M 5.5 M 11M] x 2 = 2 4 11 22 [OFDM: 6M 9M 12 M 18 M 24 M 36 M 48 M 54M] x 2 = 12 18 24 36 48 72 96 108 [HT 1S MCS0 ~ MCS7] : [MCS0]=128, [MCS1]=129, [MCS1]=130 ~ [MCS7]=135

Bandwidth command rtwpriv wlan0 mp_bandwidth 40M=1,shortGI=0

//set bandwidth 40M

rtwpriv wlan0 mp_bandwidth 40M=0,shortGI=0

//set bandwidth 20M

3.1.2. Verify WiFi Rx Performance Measure the DUT Rx sensitivity to check Rx performance is ok or not. The recommended test items are listed below:

Data RateAntennaChannelItemCriterion
MCS7-B40Antenna S1 Antenna S0CH10e Sensitivity< -64dBm (1R)
MCS7-B20Antenna S1 Antenna S0CH10k < -67dBm (1R)
OFDM 54MAntenna S1 Antenna S0CH1< -71dBm (1R)
CCK 11MAntenna S1 Antenna S0CH7< -83dBm (1R)

Table 11: The recommended test items of WiFi Rx For example: You want to verify WiFi Tx Performance and you can follow step as below.

Step 1: Initial WiFi Step Please refer to Section 2.2.1.

Step 2: Verify Rx

ex: Start Rx Test(use 802.11b, channel 1, 11Mbps, Antenna S1, Bandwidth 20)

rtwpriv wlan0 mp_ant_rx a rtwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 rtwpriv wlan0 mp_channel 1 rtwpriv wlan0 mp_arx start rtwpriv wlan0 mp_reset_stats

Step 3: Get report

rtwpriv wlan0 mp_arx mac

Step 4: Stop Rx Test

rtwpriv wlan0 mp_arx stop

3.2.Verify Bluetooth Performance Step​

3.2.1. Verify Bluetooth Tx Performance BT MAP is burned in EFuse already. Only verify Bluetooth TX/RX performance. Bluetooth Tx criterion is shown as below:

Verify TxTest ItemSub Test ItemPacket TypeChannelCriterion
Bluetooth Spec.
Maximum Output PowerAverage PowerDH1Low (CH6)> 0dBm
k Middle (CH42)> 0dBm
High (CH70)> 0dBm
Modulation CharacteristicsDelta F1 Avg.DH1e All140KHz ~ 175KHz
Delta F2 Avg.140KHz ~ 175KHz
Delta F2 Max.> 115KHz
Modulation Index> 0.8
Initial Carrier Frequency ErrortDH1All-20KHz ~ 20KHz

Table 12: The recommended test items of Bluetooth Tx

EX: Step 1: Enter MP Mode and download patch code

Step 2: Set default table Step 3: Set Parameter :

You can use “bt_mp_SetParam” to set parameters and can use ”bt_mp_GetParam” to check it. The Format is bt_mp_SetParam Index0,value0; Index1,..;IndexN,valueN Example : If you want to set the channel 10 and packet type “BT_PKT_3DH5”, you can use” bt_mp_SetParam0x01,0x0a;0x02,0x08”

Step 4: Run Packe Tx bt_mp_Exec 12

Step 5: measured by Bluetooth test instrument(ex. Letepoint IQNxN) bt_mp_Report 1 bt_mp_Report 1” should be executed every 1s

COMMANDINDEX
HCI RESET _0
TEST MODE ENABLE _ _1
PG EFUSE RAWDATA _ _2
SET TX GAIN TABLE _ _ _3
SET TX DAC TABLE _ _ _4
SET DEFAULT TX GAIN TABLE _ _ _ _5
SET DEFAULT TX DAC TABLE _ _ _ _6
SET POWER GAIN INDEX _ _ _7
SET POWER GAIN _ _8
SET POWER DAC _ _9
SET XTAL _10
REPORT CLEAR _e 11
PACKET TX START _ _12
PACKET TX UPDATE _ _13
t PACKET TX STOP _ _14
CONTINUE TX START _ _15
l CONTINUE TX UPDATE _ _16
CONTINUE TX STOP _ _17
PACKET RX START _ _18
a PACKET RX UPDATE _ _19
PACKET RX STOP _ _20
HOPPING DWELL TIME _ _21
LE TX DUT TEST CMD _ _ _ _22
LE RX DUT TEST CMD _ _ _ _23
LE DUT TEST END CMD _ _ _ _24
READ EFUSE DATA _ _25
LE CONTINUE TX START _ _ _28
LE CONTINUE TX STOP _ _29
FW PACKET TX START _ _ _30
FW PACKET TX STOP _ _ _31
FW PACKET RX START _ _ _32
FW PACKET RX STOP _ _ _33
FW CONTINUE TX START _ _ _34
FW CONTINUE TX STOP _ _ _35
FW LE CONTINUE TX START _ _ _ _36
FW LE CONTINUE TX STOP _ _ _ _37
FW READ TX POWER INFO _ _ _ _38

Table 13: The parameter Indexes define in “bt_mp_Exec” Table

INDEXVALUELengthValue RangeTable Index
(Byte)
0PGRawData256Row dataNone
1ChannelNumber10~78None
2PacketType10~9Table 21: The parameter Indexes
define in PacketType Table
3PayloadType10~7Table 22: The parameter Indexes
define in PayloadType Table
4TxPacketCount20~0xFFF0:infinite TX packet count
(only for packet tx)k
6WhiteningCoeffValue10x00~0x7F0x00~0x7F: Enable Whitening
0x80~0xFF: Disable Whitening
7TxGainIndex1e 1~7None
9PacketHeader40x0~0x3FFFFNone
10HoppingFixChannel10 : DisableNone
(for Hopping mode)t 1 : Enable Fix Channel
11HitTarget66 bytesNone
14Xtal40~0x3FNone
15LEDataLen1l 0~0x25None

Table 14: The parameter Indexes define in “bt_mp_setParam” Table

NAMEINDEXPayload Length in bits
BT PKT DH1 _ _00~27*8
BT PKT DH3 _ _10~183*8
BT PKT DH5 _ _20~339*8
BT PKT 2DH1 _ _30~54*8
BT PKT 2DH3 _ _40~367*8
BT PKT 2DH5 _ _50~679*8
BT PKT 3DH1 _ _60~83*8
BT PKT 3DH3 _ _70~552*8
BT PKT 3DH5 _ _80~1021*8
BT PKT LE _ _90~39*8

Table 15: The parameter Indexes define in PacketType Table

NAMEINDEX
BT PAYLOAD TYPE ALL0 _ _ _0
t BT PAYLOAD TYPE ALL1 _ _ _1
BT PAYLOAD TYPE 0101 _ _ _2
l BT PAYLOAD TYPE 1010 _ _ _3
BT PAYLOAD TYPE 0x0 0xF _ _ _ _4
BT PAYLOAD TYPE 0000 1111 _ _ _ _5
a BT PAYLOAD TYPE 1111 0000 _ _ _ _6
BT PAYLOAD TYPE PRBS9 _ _ _7

Table 16: The parameter Indexes define in PayloadType Table

NAMEINDEXRETURN
PKT TX1StatusTXBitsTxCounts
CONT TX2StatusTXBitsTxCounts
PKT RX3StatusRxRssiRXBitsRxCountsRxErrorBits
Tx Gain Table4StatusTx Gain Table
Tx DAC Table5StatusTx DAC Table
Xtal6StatusXtal
Thermal7StatusThermal
Stage8StatusStage
Efuse10StatusEfusek
LE RX11StatusRxCounts
LE CONT TX12StatusTXBitsTxCounts
FW PKT TX _ _13StatusTXBitsTxCountse
FW CONT TX _ _14StatusTXBitsTxCounts
FW PKT RX _ _15StatusRxRssiRXBitsRxCountsRxErrorBits
FW LE CONT TX _ _ _16StatusTXBitst TxCounts
TX POWER INFO _ _17Statusl Max tx power index1M default tx power index2M default tx power index3M default tx power indexLE default tx power index

Table 17: The parameter Indexes define in “bt_mp_Report” Table

Step 6: Stop Packe Tx bt_mp_Exec 14 If you need to test other parameters, please stop packet tx and go back to step 3

3.2.2. Verify Bluetooth Rx Performance Measure the DUT Rx sensitivity to check Rx performance is ok or not. The Rx performance test can be measured in Signaling mode (ex: Anritsu 8852B, Agilent N4010A) or Non-Signaling mode (ex: LitePoint IQFlex). Bluetooth Rx criterion is shown as below:

Verify RxTest ItemPacket TypeCriterion
Bluetooth Spec.
SensitivityDH1 or 3DH5< -70dBm

Table 18: The recommended test items of Bluetooth Rx EX: Step 1: Enter MP Mode and download patch code

Step 2: Set default table

Step 3: Set Parameter

Step 4: To setting Parameter with the Bluetooth test instrument. Bluetooth test instrument begin transmit.

Step 5: Run Packe Rx bt_map_Exec 18

Step 6: Report Received Result. bt_mp_Report 3 bt_mp_Report 3” should be executed every 1s.

Step 7: Stop Packe Rx bt_map_Exec 20 If you need to test other parameters, please stop packet Rx and go back to step 3.

4. Write WiFi Data to Storage​

There are three methods provided. 1. Writing All Data to Efuse. 2. Read Linux Efuse file Map Load and Mask Map to Driver Fake. 3. When Efuse was Written, Modify a Part of Data to Efuse.

4.1.Writing All Data to Efuse​

Use linux command line to write data to efuse. When DUT boot up, driver load efuse for initial DUT. Write board-dependent information into respective eFuse offset, this information include MAC address, calibrated Tx index(the eFuse location is as the above mentioned), Thermal Meter(the eFuse location is as the above mentioned), and so on.

4.1.1. Initial WiFi Step Please refer to Section 2.2.1.

4.1.2. Write WiFi Efuse

4.1.2.1. Write All Data to Driver Fake Driver only saves the contents in shadow memory (Driver Fake). Until you write down all data, you can use command (section 3.1.2.6) to write effuse from driver fake. This can increase efuse lifetime.

Below diagram shows content of Mapfile.

0x00
R 0x10
0x20
… …

Figure 12: Mapfile of Linux Format And use below command to write eFuse content to driver fake.

Figure 13: Write Efuse CMD

4.1.2.2. Write Crystal to Driver Fake Use below command to write one byte data to driver fake. The relative control commands about modifying WiFi Crystal.

rtwpriv wlan0 efuse_set wlwfake,B9,Crystal_value (Please write hexadecimal value)

ex: Please refer to section 2.3.1.2 you can get Crystal value (the value is decimal). If Crystal value = 2, you use command as below:

rtwpriv wlan0 efuse_set wlwfake,B9,02

4.1.2.3. Write Thermal to Driver Fake Use below command to write one byte data to driver fake. The relative control commands about modifying WiFi Thermal.

rtwpriv wlan0 efuse_set wlwfake,BA,thermal_value (Please write hexadecimal value)

ex: Please refer to section 3.3.2.4, you can get thermal value (the value is decimal). If thermal value = 29, you use command as below:

rtwpriv wlan0 efuse_set wlwfake,BA,1D 4.1.2.4. Write WiFi Mac Address to Driver Fake The eFuse content about setting of MAC address is as following table.

 RTL8723DE MAC address

WiFi MAC address 0XD0 Table 19: RTL8723DE WiFi MAC address offset in eFuse

 RTL8723DU MAC address

WiFi MAC address 0X107 Table 20: RTL8723DU WiFi MAC address offset in eFuse

 RTL8723DS MAC address

WiFi MAC address 0X11A Table 21: RTL8723DS WiFi MAC address offset in eFuse

The relative control commands about modifying WiFi MAC Address. EX: RTL8723DE

rtwpriv wlan0 efuse_set wlwfake,D0,MACaddress

(ex: MAC = 123456789ABC) rtwpriv wlan0 efuse_set wlwfake,D0, 123456789ABC

4.1.2.5. Read the Driver Fake Map for Verify and Confirm It When you complete all data which you want to modify, you can use command as below to verify and confirm it.

rtwpriv wlan0 efuse_get wlrfkmap

4.1.2.6. Write Driver Fake to EFuse When you complete all data which you want to modify, you can use command as below to write driver fake to efuse. Use command as show: rtwpriv wlan0 efuse_set wlfk2map to write driver fake to eFuse.

4.1.3. Read WiFi EFuse Use command as show: rtwpriv wlan0 efuse_get realmap to read eFuse.

4.2.Read Linux Efuse file Map Load to Driver Fake(Recommend)​

If you want to read efuse file to driver fake, you can use follow command.

4.2.1. Initial WiFi Step Please refer to Section 2.2.1.

4.2.2. Read Linux Efuse file Map Load to Driver Fake Open effuse map file and loading to driver fake map Use command as show: rtwpriv wlan0 efuse_file /../../efuse.map

Figure 14: efuse.map contents Attention: If the driver version over the “rtl8xxx_WiFi_linux_ v5.X.X_19292”. Pair of the load efuse file and mask_file CMD before the wlfk2map. rtwpriv wlan0 efuse_file /…/…/xxx.map rtwpriv wlan0 efuse_set wlfk2map If there is no mask file be loaded, it will return error message.

rtwpriv wlan0 efuse_mask /xx/xx/xxmask.txt Or Use input eFuse mask data: rtwpriv wlan0 efuse_mask data,00:11:22:33:44:55:66:77:88:99:FF:AA:BB:CC:DD:EE Return message format: wlan0 efuse_mask:data:00:11:22:33:44:55:66:77:88:99:ff:aa:bb:cc:dd:ee Load Efuse Mask data 16 hex ok

4.2.2.1. Read the Driver Fake Map for Verify and Confirm It

Use command as show: rtwpriv wlan0 efuse_get wlrfkmap

4.2.2.2. Modify a Part of Data to Driver Fake

Use command as show: rtwpriv wlan0 efuse_set wlwfake,C9,012345… Address C9 and value 01234 is an example.

4.2.2.3. Write Driver Fake to EFuse When you complete data which you want to modify, you can use command as below to write driver fake to efuse.

Use command as show: rtwpriv wlan0 efuse_set wlfk2map to write driver fake to eFuse.

4.2.2.4. Read WiFi EFuse

Use command as show: rtwpriv wlan0 efuse_get realmap to read eFuse.

4.3.When Efuse Was Written, Modify a Part of Data to Efuse​

When Efuse was written, you want to modify a part of data to eFuse. You can use below step. Note: If efuse is empty, don’t use this method.

4.3.1. Initial WiFi Step Please refer to Section 2.2.1.

4.3.2. Writing a Part of Data to Efuse

4.3.2.1. Read Efuse Map and Loading to Driver Fake Map

Use command as show: rtwpriv wlan0 efuse_set wldumpfake to read efuse map and loading to driver fake map

4.3.2.2. Modify a Part of Data to Driver Fake

Use command as show: rtwpriv wlan0 efuse_set wlwfake,C9,012345… Address C9 and value 01234 is an example.

4.3.2.3. Read the Driver Fake Map for Verify and Confirm It When you complete all data which you want to modify, you can use command as below to verify and confirm it.

rtwpriv wlan0 efuse_get wlrfkmap

4.3.2.4. Write Driver Fake to EFuse When you complete data which you want to modify, you can use command as below to write driver fake to efuse.

Use command as show: rtwpriv wlan0 efuse_set wlfk2map to write driver fake to eFuse.

4.3.2.5. Read WiFi EFuse

Use command as show: rtwpriv wlan0 efuse_get realmap to read eFuse.

4.3.2.6. Another Method Writes Data to Efuse When efuse is empty or efuse has data, you can use command as show: rtwpriv wlan0 efuse_set wmap,C9,0123456789… This method writes efuse immediate, not use driver fake. Address C9 and value 0123456789… is an example.

5. Write Bluetooth Data to Storage​

There are two methods provided. 1. Writing All Data to Efuse. 2. Read Linux Efuse file Map Load and Mask Map to Driver Fake.

5.1.Writing All Data to Efuse​

Use linux command line to write data to efuse. When DUT boot up, driver load efuse for initial DUT. Write board-dependent information into respective eFuse offset, this information include MAC address, calibrated Tx index(the eFuse location is as the above mentioned), and so on.

5.1.1. Write Bluetooth Efuse

5.1.1.1. Write All Data to Driver Fake Driver only saves the contents in shadow memory (Driver Fake). Until you write down all data, you can use command to write effuse from driver fake. This can increase efuse lifetime.

rtwpriv wlan0 efuse_set btwfake,14,0123456789… … …

5.1.1.2. Write Driver Fake to EFuse When you complete all data which you want to modify, you can use command as below to write driver fake to efuse.

Use command as show:

echo 1 > /sys/class/rfkill/rfkill0/state
//bt power on

rtwpriv wlan0 effuse_set btfk2map

to write driver fake to eFuse.

5.1.1.3. Read the Driver Fake Map for Verify and Confirm It When you complete all data which you want to modify, you can use command as below to verify and confirm it. rtwpriv wlan0 efuse_get btfmap //Read from HW BT of the front efuse logic map. rtwpriv wlan0 efuse_get btbmap //Read from HW BT of the back efuse logic map.

Read the contents of the fake before and after.

5.2.When Efuse Was Written, Modify a Part of Data to Efuse​

When Efuse was written, you want to modify a part of data to eFuse. You can use below step. Note: If efuse is empty, don’t use this method.

5.2.1. Writing a Part of Data to Efuse

5.2.1.1. Read Efuse Map and Loading to Driver Fake Map

Use command as show:

rtwpriv wlan0 efuse_set btdumpfake

to read efuse map and loading to driver fake map

5.2.1.2. Modify a Part of Data to Driver Fake

Use command as show:

rtwpriv wlan0 efuse_set btwfake,14,0123456789…

5.2.1.3. Write Driver Fake to EFuse When you complete all data which you want to modify, you can use command as below to write driver fake to efuse.

Use command as show:

echo 1 > /sys/class/rfkill/rfkill0/state
//bt power on

rtwpriv wlan0 effuse_set btfk2map

to write driver fake to eFuse.

5.2.1.4. Read the Driver Fake Map for Verify and Confirm It When you complete all data which you want to modify, you can use command as below to verify and confirm it.

rtwpriv wlan0 efuse_get btfmap //Read from HW BT of the front efuse logic map. rtwpriv wlan0 efuse_get btbmap //Read from HW BT of the back efuse logic map.

Read the contents of the fake before and after.

6. K-FREE FLOW​

When you finish Chap1~Chap4, you will get sufficient mapfile. These mapfile include calibrated Crystal ,Tx power index ,Thermal meter offset and Power Difference, and these value must be averaged for created new mapfile. You write new mapfile to eFuse, and restart DUT to apply default value. And then verify Tx/Rx performance.

6.1.Prepared Job​

When you finish Chap1~Chap4, you will get sufficient mapfile. Please refer to Tabel1 and Table2 to the location of Crystal ,Tx power index ,Thermal meter offset and Power Difference in mapfile. You must average these value and update mapfile. And then write the map file to efuse.

6.2.Write MAP to EFuse​

6.2.1. Write Map to Storage and Check Contents

Below diagram shows the first step of kfree flow.

success Write Map to Storage Done Writed and Check Contents Map

failure

FAIL

Figure 15: Write MAP to EFuse Flow

6.2.2. Initial DUT

Please refer to Section 2.2.1.

The command about initial DUT is as below

remount root

rmmod wlan
insmod wlan.ko

(delay 5 second) ifconfig wlan0 up rtwpriv wlan0 mp_start

6.2.3. Write MAP to EFuse

Please refer to Section 3.2. The command about writing eFuse is as below.

Step1: Read map file and mask data. rtwpriv wlan0 efuse_file /…/…/xxx.map rtwpriv wlan0 efuse_mask /xx/xx/xxmask.txt Step 2: Read the Driver Fake Map for Verify and Confirm It rtwpriv wlan0 efuse_set wlfk2map

Step 3: Modify a Part of Data to Driver Fake EX: Mac Address,

The eFuse content about setting of MAC address is as following table.

 RTL8723DE MAC address

WiFi MAC address 0XD0 Table 22: RTL8723DE WiFi MAC address offset in eFuse

 RTL8723DU MAC address

WiFi MAC address 0X107 Table 23: RTL8723DU WiFi MAC address offset in eFuse

 RTL8723DS MAC address

WiFi MAC address 0X11A Table 24: RTL8723DS WiFi MAC address offset in eFuse

The relative control commands is about modifying WiFi MAC Address. EX: RTL8723DE

rtwpriv wlan0 efuse_set wlwfake,D0,MACaddress

Step 4: Read the Driver Fake Map for Verify and Confirm It When you finish the modification, you can use command as below to verify and confirm it.

rtwpriv wlan0 efuse_get wlrfkmap Step 5: Write Driver Fake to EFuse When you finish the modification, you can use command as below to write driver fake to efuse.

Use command as show: rtwpriv wlan0 efuse_set wlfk2map to write driver fake to eFuse.

Step 6: Read WiFi EFuse Use command as show: rtwpriv wlan0 efuse_get realmap to read eFuse.

6.3.Verify Tx/Rx Performance​

Below diagram shows second step of kfree flow. success success

Initial DUT Verify WiFi Tx Verify WiFi Rx

failure failure failure success FAIL

Done Verified

Figure 16: Verify Tx/Rx Performance Flow

6.3.1. Initial DUT

If we write Map to eFuse successfully. We must initial DUT for verified.

The relative control commands about Initial DUT.

remount root

rmmod wlan
insmod wlan.ko

(delay 5 second) ifconfig wlan0 up rtwpriv wlan0 mp_start

6.3.2. Verify Tx/Rx Performance

We must verify WiFi Tx/Rx Performance .Please refer to Chap3, Chap4.

The command of verifying WiFi Tx Performance is as below: Verify WiFI Tx Performance Ex: Rate MCS7, Bandwidth40, Channel 4 , Tx_target = 13dBm, Index_MCS7_B40_Group2 = 42(the value is from map)

rtwpriv wlan0 mp_bandwidth 40M=1,shortGI=0 rtwpriv wlan0 mp_channel 4 rtwpriv wlan0 mp_rate 135 rtwpriv wlan0 mp_txpower patha=42,pathb=0 rtwpriv wlan0 mp_ctx background,pkt

Verify WiFI Rx Performance ex: Start Rx Test(use 802.11b, channel 1, 11Mbps, Antenna 0, Bandwidth 20)

rtwpriv wlan0 mp_bandwidth 40M=0,shortGI=0 rtwpriv wlan0 mp_channel 1 rtwpriv wlan0 mp_arx start rtwpriv wlan0 mp_reset_stats

Stop Rx Test and get report

rtwpriv wlan0 mp_arx mac rtwpriv wlan0 mp_arx stop