Telink TLSR8232 BLE SDK Developer Handbook
AN-19112700-E1
55
Ver.1.0.0
After the API “bls_ll_requestConnBrxEventDisable” is called and the request is accepted,
if the time (ms) corresponding to the return value is enough to process user task, the task
will be executed. Before the task starts, the API “bls_ll_disableConnBrxEvent” should be
called to disable Brx Event. After the task is finished, the API
“bls_ll_restoreConnBrxEvent” should be called to enable Brx Event and restore BLE
timing sequence.
The reference code is shown as below. Time values in the code depend on actual task.
3.2.5 Link Layer TX FIFO & RX FIFO
All RF data of APP layer and BLE Host should be transmitted via Link Layer of Controller.
A BLE TX FIFO is designed in Link Layer, which can be used to buffer the received data
and send data after brx/btx starts.
All data received from peer device during Link Layer brx/btx will be buffered in a BLE RX
FIFO, and then transmitted to BLE Host or APP layer for processing.
Both BLE TX FIFO and BLE RX FIFO in Slave role are defined in APP layer:
MYFIFO_INIT(blt_rxfifo, 64, 8);
MYFIFO_INIT(blt_txfifo, 40, 16);
By default, RX FIFO size is 64, and TX FIFO size is 40
. It’s not allowed to modify the two
size values unless it’s needed to use “data length extension” in core 4.2.
Both TX FIFO number and RX FIFO number must be configured as a power of 2, i.e. 2,
4, 8, 16, and etc. Users can modify as needed.
Default RX FIFO number is 8, which is a reasonable value to ensure up to 8 data packets
can be buffered in Link Layer bottom layer. If it’s set as large value, it will occupy large
SRAM area. If it’s set as small value, it may bring the risk of data coverage. During brx
event, Link Layer is likely to be in more data mode in an interval and continuously receive
multiple packets; if RX FIFO number is set as 4, there may be five or six packets in an
interval (e.g. OTA,), however, due to long decryption time, response to these data by
upper layer cannot be processed in real time, then some data may be overflowed.