Re: hci_uart application with flow control disable #ble #nrf52480 #uart #hci #samples

lairdjm
 

Hi,

> Q1: As i'm not using HW flow control, Can i have any flow control related problem if there will be more number of devices/beacons available for the scanning.

Yes, that is the purpose of flow control, to prevent one device sending data when the over side is unable to handle it. Will you see that issue? We can’t give you an answer to that, it’s application, area and hardware dependant e.g. if your main CPU has a UART buffer size of 16 bytes and is busy with a critical task, the nRF52840 could then send e.g. 20 bytes of data and overflow the UART buffer, then when your CPU is finished with the critical task, it’s lost at least 4 bytes.


> Q2: Can i implement software flow control in hci_uart application ? If yes then how?

The hardware flow control is actually handled in-hardware on the nRF52840, it does not have hardware to support software flow control so if you wanted to add that, you’d have to create all the code for it

Thanks,
Jamie

 

From: devel@... <devel@...> On Behalf Of Mayank via Lists.Zephyrproject.Org
Sent: 18 February 2020 09:29
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] hci_uart application with flow control disable #ble #hci #nrf52480 #uart #samples

 

EXTERNAL EMAIL: Be careful with attachments and links.

Hi All,

I have a doubt regarding one of the sample application of zephyr (samples/bluetooth/hci_uart).
This 'hci_uart' application has Hardware flow control enable by default in its nrf.conf file. (CONFIG_UART_0_NRF_FLOW_CONTROL=y)

I have build this sample app with CONFIG_UART_0_NRF_FLOW_CONTROL=n. So, i have only configured Tx, Rx from zephyr side.

I have one custom board based on IMX6ULL processor, and on that i have connected nordic's nRF52840 chip over UART ( Flashed nRF52840 with above mentioned hci_uart application).
Purpose: To scan BLE beacons for 10 seconds, Sleep for 10 sec, Scan for 10 sec, and so on (Continuous).

From processor side also i have disabled the hardware flow control (Hence,Only using Tx, Rx).

Q1: As i'm not using HW flow control, Can i have any flow control related problem if there will be more number of devices/beacons available for the scanning.
Q2: Can i implement software flow control in hci_uart application ? If yes then how?
Q3: What is the meaning of this flag in zephyr confiuration : CONFIG_BT_HCI_ACL_FLOW_CONTROL?

NOTE: Currently i'm not observing any problem while scanning around 70 beacons exists in the surrounding environment.

Join devel@lists.zephyrproject.org to automatically receive all group messages.