找回密码
 立即注册

微信扫码登录

查看: 928|回复: 7

[BLE SDK] Indications are not retransmitted causing issues when packets are lost

[复制链接]

2

主题

4

回帖

62

积分

不屈白银

积分
62
发表于 2025-3-4 04:54:02 | 显示全部楼层 |阅读模式
Information
说明:   建议参照本版块置顶帖内容输入必要信息
芯片型号: TLSR8251
SDK及版本: b85m_ble_single_connection_sdk_V3.4.2.4 patch_3
We have enabled indications and are then sending data using blc_gatt_pushHandleValueIndicate(). Sometimes the indications do not arrive, which causes the following calls to fail with error 193/0xC1 (GATT_ERR_PREVIOUS_INDICATE_DATA_HAS_NOT_CONFIRMED). They are probably lost in the air. There seems to be no retransmission and no way to manually retransmit the packet. As far as I understand, the packet should be retransmitted if it's not acknowledged by the client.

Do you have any idea why this is happening and how I can recover from a situation where a packet is lost during transmission?


2

主题

4

回帖

62

积分

不屈白银

积分
62
 楼主| 发表于 2025-3-4 06:50:21 | 显示全部楼层
It looks like the cause might be an inaccurate external 32k oscillator. I am doing blc_pm_select_external_32k_crystal() as first thing in main(), is there anything else I need to do in order to calibrate the external oscillator? The datasheet mentions a "Programmable on chip load cap".

Additionally, when I select the external 32k oscillator after a reset caused by the programmer the CPU stalls in blt_sdk_main_loop(). I need to power-cycle after programming and then it at least runs but it causes the packet loss.

2

主题

4

回帖

62

积分

不屈白银

积分
62
 楼主| 发表于 2025-3-7 05:40:35 | 显示全部楼层
This is still an issue: When selecting the external crystal it does not work properly and the timing is off. Is there any way to perform the calibration of the external crystal and control the on chip load cap?

48

主题

178

回帖

735

积分

版主

积分
735
发表于 2025-3-7 15:44:02 | 显示全部楼层
The platform uses pm_check_32k_clk_stable to confirm whether external 32k crystal is stable.

2

主题

4

回帖

62

积分

不屈白银

积分
62
 楼主| 发表于 2025-3-7 20:56:08 | 显示全部楼层
What happens if it is not stable? Does it stall in that case?

The functions does not check the frequency deviation or perform calibration though, right? So if the on chip load caps are causing a high frequency deviation that would not be detected?

48

主题

178

回帖

735

积分

版主

积分
735
发表于 2025-3-10 19:05:50 | 显示全部楼层
If it is not stable, BLE will not go to sleep.  This function checks the frequency, but only roughly.

2

主题

4

回帖

62

积分

不屈白银

积分
62
 楼主| 发表于 2025-3-13 04:06:52 | 显示全部楼层
How do I perform calibration of the 32k pad oscillator? And would it theoretically be possible to write a custom version of the "cpu_sleep_wakeup" and "pm_tim_recover" function to use a crystal that has a high but constant frequency deviation? Or do other things rely on the timing to be exactly 32.768kHz? I believe that maybe during production wrong oscillators were fitted.

48

主题

178

回帖

735

积分

版主

积分
735
发表于 2025-3-17 09:31:03 | 显示全部楼层
Now it is impossible to write a custom version of the "cpu_sleep_wakeup" and "pm_tim_recover" function,this involves a lot of register actions.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Telink forum ( 沪ICP备17008231号-1 )

GMT+8, 2025-4-4 17:53 , Processed in 0.091385 second(s), 21 queries .

Powered by Telink 隐私政策

泰凌微电子版权所有 © 。保留所有权利。 2024

快速回复 返回顶部 返回列表