RX/TX testing for Bluetooth Product

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RX/TX testing for Bluetooth Product

2,791 Views
kuldeep_chaturv
Contributor II

Hi,

We are using kw36a MCU in our product.

we want to test the antenna performance and RF testing.

we come to know that some or the register can be used for this purpose.

these are:

RX_MODE_OVRD

RX_MODE_OVRD_EN

TX_MODE_OVRD

TX_MODE_OVRD_EN

I understand that we may neen to make RX_MODE_OVRD_EN as 1. and then RX_MODE_OVRD will be used.

however what value we need to set in that case for RX_MODE_OVRD and what is the meaning of this value?

it is mentioned as "Override value for RX_MODE" what does this means? which value it overrides with what value?

Same question is for TX mode.

Edit1:

Also from Application how Can we change the values of these registers?

Thanks,

Kuldeep

Labels (1)
Tags (1)
15 Replies

2,429 Views
kuldeep_chaturv
Contributor II

Hi James,

I manage to make GENFSK project for my HW unit.

Now it is successfully calling 

GENFSK_Command(RX_START_NOW); for Binary#1

and GENFSK_Command(TX_START_NOW); for Binary# 2 .

Some questions:

Q1

If I see closely, the above commands are essentially setting below register

"GENFSK->XCVR_CTRL"

However My purpose for this code is to set the following registers:

Binary#1:
RX_MODE_OVRD 1
RX_MODE_OVRD_EN 1
TX_MODE_OVRD  0
TX_MODE_OVRD_EN 1

 

Binary#2:
RX_MODE_OVRD 0
RX_MODE_OVRD_EN 1
TX_MODE_OVRD  1
TX_MODE_OVRD_EN 1

are they related and did my purpose solved with the above code?

Q2

TX has certain no. of packets to be sent, is the above command TX_START_NOW will send the packets continuesly? or they will stop after certain no. of packats transfer?

 

Br,

Kuldeep

0 Kudos

2,429 Views
xing_chang
NXP Employee
NXP Employee

Hi kuldeep.chaturvedi@visteon.com‌,

For RF evaluation, please refer to the document AN12076.pdf.

The Generic FSK Connectivity Test allows the user to: set the transceiver in several continuous TX
modes, for details, please refer to the documentation of 'Generic FSK Link Layer Quick Start Guide.pdf' in the SDK.

pastedImage_1.png

0 Kudos

2,429 Views
james_zhang
NXP Employee
NXP Employee

Hi Kuldeep,

It's big effort to integrate the GFSK project into HID project. Is it a must to support test function in your project? If not, suggest to use the standalone GFSK project to test the RF performance, thanks.

BR,

James

0 Kudos

2,429 Views
kuldeep_chaturv
Contributor II

Hi James,

Thanks for the reply.

I am going to use this project reference.

as you may know basically we are having HID demo project as base for our program and now I will add genfsk module in it and will call its interfaces from APPmain.

One question which interface to be called to get the following result?

Binary#1:
RX_MODE_OVRD 1
RX_MODE_OVRD_EN 1
TX_MODE_OVRD  0
TX_MODE_OVRD_EN 1

 

Binary#2:
RX_MODE_OVRD 0
RX_MODE_OVRD_EN 1
TX_MODE_OVRD  1
TX_MODE_OVRD_EN 1

should i call GENFSK_StartTx() for first binary and GENFSK_StartRx() for second binary?

Also do I need to initialize BTLE as well before calling genfsk frunction?

Br,

Kuldeep

0 Kudos

2,429 Views
james_zhang
NXP Employee
NXP Employee

Hi Kuldeep,

The impedence testing is actually not necessary, the TX power and RX sensitivity can be got as speced following the NXP hardware design guide. The 50 ohm impedence for antenna is the key factor to ensure RF performance as the RF circuit is designed to work with this value.

If it's mandtory to test the KW36 RF impedence, the GFSK project is recommendanded as both the channel and power level can be tuned easily with the project. If still want to use the default UART, just keep the host MCU reseted, then UART can be connected with external PC.

Thanks,

James

0 Kudos

2,429 Views
xing_chang
NXP Employee
NXP Employee

Hi Kuldeep Chaturvedi‌,

Sebastian is right. It is unrealistic to directly modify the registers to implement your functions. This will be a huge project that cannot be realized.

You can use the GFSK project to try it out. It is also an interactive test environment based on UART, but it provides some APIs. You can bypass the UART interface and directly call these APIs to implement your functions.

Of course, the most convenient way is to make the testing interactively through UART or other interfaces.

project path: ...sdk\boards\frdmkw36\wireless_examples\genfsk\conn_test

2,429 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Kuldeep, I hope you're doing well!

You can do Tx and Rx tests using the NXP test tool's Radio Test mode (Marked "A" in the attached picture).

You'll need to program the HCI Black Box example to both of your MCU's.

You can configure the test to change the payload length, channel and type. In this example, I have used a KW41 (COM3) as a tester and a KW36 (COM7)as the tested device.

pastedImage_1.png

 

You can change between a Tx or Rx text using the selector to the left of the "Start TX Test" button (Marked "B").

 

The PER test result will be displayed on the PER - % box (Marked "C").

 

Please let me know if you have any further questions.

 

Best regards,

Sebastian

0 Kudos

2,429 Views
kuldeep_chaturv
Contributor II

Hi Sebastian,

We have 2 variant of this product.

Variant 1: KW36 is connected over UART lines with existing Cluster.

Variant 2: KW36 is and independent module in our PWB.

I believe we need the UART connection with external tool in that case do we need to do following:

1. Disconnect the UART lines from meter and connect with external interface with PC.

2. prepare HCI Blackbox demo example and flash the image in KW36.

3. Connect the UART with RF tool .

4. perform the test.

Are the above steps are correct?

Also the above mentioned RX and TX test are same as we are trying to do with those registers manually in code?

we actually want to test the impedance in HW, and we got the response from NXP in email thread to use the mentioned register.

to prepare following images.

will the RF tester give us the same result as mentioned in below change points.

Binary#1:
RX_MODE_OVRD 1
RX_MODE_OVRD_EN 1
TX_MODE_OVRD  0
TX_MODE_OVRD_EN 1

Binary#2:
RX_MODE_OVRD 0
RX_MODE_OVRD_EN 1
TX_MODE_OVRD  1
TX_MODE_OVRD_EN 1

Br,

Kuldeep

0 Kudos

2,429 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Kuldeep,

 

The steps you describe are correct, that way you should be able to test the devices. However, you don't necessarily need to disconnect the UART lines from the meter, as you can connect to the tool using the debug UART mapped to the USB port of your device, as well as other pins. You can connect to both maps, and see the commands in the external mapped pins.

 

This test tool should give you the same results as performing the test via code, it's just done in an easier way as the commands are being sent automatically via the tool to your device instead of being written directly into the code.

 

Please let me know if you have any further questions.

 

Best regards,

Sebastian

0 Kudos

2,429 Views
kuldeep_chaturv
Contributor II

Hi Sebastian,

Thanks for your answer.

I discussed internally about using the tool u mentioned, seems like at this point of time our board doesn't use the second UART and we don't have provisioning for USB either.

so our current option is to hard code and prepare binaries.

to do that I tried to do following.

1. Using HCI_Blackbox example.

2. enable gMWS_UseCoexistence_d macro.( It doesn't work by simply making it 1 in MWS.h, as this file is not included in "fsm_xcvr.h" so I have includes MWS.h in "fsm_xcvr.h" by removing the condition of  gMWS_UseCoexistence_d  defined.

3. in board.c file, i tried to call below in hardware_initi() function.

#if gMWS_UseCoexistence_d
/* reset TSM timing registers used by CoEx */
XCVR_TSM->TIMING43 = 0xFFFFFFFF;
XCVR_TSM->TIMING49 = 0xFFFFFFFF;
XCVR_TSM->TIMING50 = 0xFFFFFFFF;
/* clear TSM_IRQ0 flag, if set */
if(XCVR_MISC->XCVR_STATUS & XCVR_CTRL_XCVR_STATUS_TSM_IRQ0_MASK)
{
XCVR_MISC->XCVR_STATUS |= XCVR_CTRL_XCVR_STATUS_TSM_IRQ0_MASK;
}
XCVR_TSM->OVRD3 = 11; //This will enable the RX mode
#endif

However it is throwing an exception in the first highlighted line.

second highlighted line i have added to do the first binary.

I am not sure what is wrong, is their anything else i need to enable/disable?

Br,

Kuldeep

0 Kudos

2,429 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Kuldeep,

 

We don't recommend going the hardcoding route, as that can get very complicated because a lot of things need to be considered and changed.

 

If you have a second UART available, you could configure it and map it to some pins to be able to use it to run the tests.

If you don't have a UART available, you can modify the code to use an SPI module instead, and send the HCI commands to it this way, both methods should work.

 

Please let me know if you have any more questions.

 

Best regards,

Sebastian

0 Kudos

2,429 Views
kuldeep_chaturv
Contributor II

Hi Sebastian,

we do have second UART as part of the chip but it is not mapped as per design, as not planning to use it.

I think the UART pin alone may not work, and we need transreceiver at boards end to do this.

in our board we don't have it, could you suggest some method which saves time?

I am still in doubt, that even if we do all this we still don't get the result we are looking for about impedance testing.

r u sure we can emulate the result as i mentioned for the binary expectations as above, for registers setting.

Br,

Kuldeep

0 Kudos

2,429 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Kuldeep,

 

For the Tx and Rx test, the best course of action would be to map the pins to a UART, or some other communication protocol such as SPI and perform the test. Hardcoding is not recommended.

 

As for impedance testing, the antenna impedance is provided in the Design Considerations document for the KW36Z, and is specified to be 50 Ohm. So the antenna you will use will have to have the same impedance.

 

Best regards,

Sebastian

 

 

0 Kudos

2,429 Views
kuldeep_chaturv
Contributor II

Hi Sebastian,

thanks for the answer.

I agree to use the Test tool for RF testing, however as per our internal requirment.

Impedance verification is mandatory for RF circuits, so we have to modify SW as per above needs for changing the register.

So kindly suggest a way to do it.

Br,

Kuldeep

0 Kudos

2,429 Views
Sebastian_Del_Rio
NXP Employee
NXP Employee

Hi Kuldeep,

 

To measure the impedance, you would need to use a VNA and measure the impedance that way, as there is no possible way to measure the impedance of the antenna via software.

 

I'm sorry for any inconvenience this may cause you.

 

Best regards,

Sebastian

0 Kudos