QN9080 - uart issue

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

QN9080 - uart issue

1,885 Views
shai_b
Senior Contributor II

Hello Team,

My customer is trying to use UART with 921600bps and failed, he uses the following PINs 

QN_PA17_U0_RXD - pin number 31
QN_PA16_U0_TXD - pin number 32

Could you please advise how to config correctly the UART, BTW the customer based his code on the WirelessUART demo?

second thing, he found out that there is a kind of delay between the sending words over the UART, please the pics below:

In the first pic below, you can see the HOST uart sending string signal (sent ASCI "1" = 31hex)

QN9080UART_1.png

in the second pic, you can see the received data (on the RX the QN9080) with the gap (delay) between the words

 QN9080UART_2.png

Could you please advise how we can improve the performance?

The customer is trying to achieve a stream channel, Thanks in advance.

Kind regards,

Shai 

Labels (1)
  • QN

Tags (2)
0 Kudos
Reply
5 Replies

1,867 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @shai_b,

I hope you are doing great. I am checking the baud rate that the customer is trying to set. I am working on it.

 

second thing, he found out that there is a kind of delay between the sending words over the UART, please the pics below:

Could you please provide details about this issue? What is the connection interval that you are using? also, what is the throughput that you are getting? Are you connecting 2 QN9080?

Now, I am not sure about your application, but did you try using the QPPS?

Regards,

Mario

 

0 Kudos
Reply

1,859 Views
shai_b
Senior Contributor II

Hi @mario_castaneda,

The customer tried the WirelessUART demo, he used the default setting (what comes with the example code) and he managed to increase the UART baud rate to 921600sps.

He uses FPGA to transmit the "1234567890" string in loop using 921600sps UART line to QN9080 (as a server). The client is a Galaxy S9 cellphone and the text received over the phone has missed out data, please see pic below ("should be "1234567890"):

wireleeuart_HS_test.jpg

Could you please provide in detail how we can achieve a throughput of 750ksps over BLE (using wirelessUART or QPP)?

in the datasheet, mention that you can reach to 1msps (or even 2msps if we choose the 2Mphy) 

Regards the QPP Server, somehow the demo code is not working properly and I am not sure how it can be useful for transferring data?

Could you please point out or better sending an example code of transferring UART line over air in 750ksps or better at 921.6ksps?

Waiting for your kind response, Many Thanks.

Best regards,

Shai 

0 Kudos
Reply

1,841 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @shai_b,

I am sorry for the late response. I tested by my side and it works.

Please see my modifications below.

I change the shell interface on the board.h file

#ifndef APP_SERIAL_INTERFACE_SPEED
#define APP_SERIAL_INTERFACE_SPEED (921600)//(115200) //[MC]
#endif

Also, I change the parameter that the serial manager is waiting for in the wireless_uart.c

void BleApp_Init(void)
{
    /* Initialize application support for drivers */
    BOARD_InitAdc();
.
.
(void)Serial_SetBaudRate(gAppSerMgrIf, 921600);//(uint32_t)gUARTBaudRate115200_c); //[MC]
.
.
}

Could you please provide in detail how we can achieve a throughput of 750ksps over BLE (using wireless UART or QPP)?

It will depend on the application that you want, both are customs profiles, but I am not sure if you want both roles in your application, if it is the case, wireless UART could be a better option.

I could recommend the QPP, it provides a better throughput because it is sending the data as notification without response. So, in an ideal scenario, it could reach the max throughput.

Please look at the image attached, I am reaching 140kps approx.

in the datasheet, mention that you can reach to 1msps (or even 2msps if we choose the 2Mphy) 

Regards the QPP Server, somehow the demo code is not working properly and I am not sure how it can be useful for transferring data?

What are the issues that you have with the example? What is the application that the customer developing?

Could you please point out or better sending an example code of transferring UART line over air in 750ksps or better at 921.6ksps?

I tested the QPP and wireless UART, using the UART baud rate of 1M and 921600. 

Waiting for your feedback..

Regards,

Mario

0 Kudos
Reply

1,827 Views
shai_b
Senior Contributor II

@mario_castaneda Hello,

Thanks for your inputs, but I want to be more clear about the throughput over the air, as you show in your screenshot is not a good result, since the customer looks to achieve around 750ksps, not 150ksps.  

According to the datasheet, our device (QN9080) Supports data packet length extension.

as far as I know the Bluetooth Core Specification (on 1M PHY) this feature allows for a device to extend the length of the Data Payload of 251 bytes (of a total of 265 per packet) and needs ACK as the pic below:

ble-throughput-dple.png

 If we can calculate the maximum raw data throughput which can be achieved!

251 bytes / 2500μs = 100.4 kBytes/sec = ~0.803 Mbps 

Could you please advise how we can modify the WirelessUART demo in order to improve the throughput (such as decreasing the intervals and increasing the MTU)?

This is critical for this design, I must point out the transmit is one side (from QN9080 to cellphone) so if we can change the sending data to be as a notification to gain more speed is acceptable.  

Waiting for your kind response, Thanks a lot. 

Regards,

Shai

0 Kudos
Reply

1,813 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi @shai_b,

I am sorry I didn't modify the code to support PHY 2MH.

In the app_perinclude.h file I changed

/* Enable HS Clock to support 2Mbps PHY mode setting */
#define gBleUseHSClock2MbpsPhy_c 1//[MC]0

After the Bluetooth LE connection, the central device will change the MTU and the connection interval. You could try using the IoT Toolbox to try it by your side.

The API static void QppsTxCallback() is sending the raw data, you could try to modify this information and use as a reference the QPP example

However, if you want to use the Wireless Uart example, you have to change the characteristics properties as the QPPS. In other words, the wireless UART sends the data and waits for the acknowledgment, and also has permission is to write without response. The QPP uses notifications to send the data.

Regards,

Mario

0 Kudos
Reply