找回密码
 立即注册

微信扫码登录

楼主: Flole

[BLE SDK] Missing retransmits causing connection drops

[复制链接]

3

主题

17

回帖

161

积分

荣耀黄金

积分
161
 楼主| 发表于 2025-8-8 18:04:46 | 显示全部楼层 来自 德国
本帖最后由 Flole 于 2025-8-9 21:59 编辑

I have just tested on another board, same result. Halting and resetting it with the programmer causes it to not wake up from sleep again on the second run.

3

主题

17

回帖

161

积分

荣耀黄金

积分
161
 楼主| 发表于 6 天前 | 显示全部楼层 来自 德国
本帖最后由 Flole 于 2025-8-11 18:08 编辑

I have done additional testing and setting
  1. pm_set_xtal_stable_timer_param(216, 20, 320);
复制代码
eliminates the clock drift now. Also it seems like it runs mostly stable with these parameters. With higher parameters it crashes/resets after about 8 minutes. How can I fine-tune those, the documentation doesn't really explain what each parameter does and when to increase/decrease them. The first parameter basically indicates in microseconds how long the loop for the third parameter takes? When is that loop executed and what is it for? The second parameter is also a loop/delay, when is that loop executed?

Do I also need to adjust blc_pm_setDeepsleepRetentionEarlyWakeupTiming after setting the xtal stable timer param?

Unfortunately even with these parameters the stall after a reset remains. If the CPU resets for any reason (halt/reset from the debugger, exception, watchdog timeout) it will not wake up from sleep again. A power-cycle fixes it. Any idea how I can do further debugging? I suspect a difference between power-on and another reset is, that the oscillator would be not oscillating on a power-on, so the initial "kick" to start it might not work properly after a reset? Is there anything I can do to manually power-down the oscillator after a reset (like driving the oscillator GPIOs as outputs low) and then re-start it? Maybe that could help after a non-power-on-reset?

3

主题

17

回帖

161

积分

荣耀黄金

积分
161
 楼主| 发表于 5 天前 | 显示全部楼层 来自 德国
I am slowly making progress. Adding
  1. analog_write(0x3c, 0);
  2. cpu_wakeup_init();
复制代码
to my user_init_normal() fixes the lockups where the CPU does not wake up from sleep anymore after a reset, so I am calling cpu_wakeup_init() twice now (once in main, once in user_init_normal() while doing the analog_write before). Maybe that can help you to pinpoint the problem? What I wanted to do is trigger the oscillator-kick to make sure the oscillator is running, so it looks like it was not running properly before for some reason.

0

主题

4

回帖

36

积分

英勇黄铜

积分
36
发表于 5 天前 | 显示全部楼层 来自 上海
本帖最后由 TL_HWJ 于 2025-8-12 20:46 编辑

The bin file I previously sent you can run successfully on our EVK board. Could you please try running that same bin file first to see if it works properly? This would help rule out any potential hardware issues on your side.

3

主题

17

回帖

161

积分

荣耀黄金

积分
161
 楼主| 发表于 4 天前 | 显示全部楼层 来自 德国
I tried running the bin file and it shows the issue. If for whatever reason the CPU resets without a power-cycle it never wakes up from sleep again when it goes to sleep after the reset.

The crystal has a connection to the CPU and has 2 load capacitors to match the crystals 12.5pF expected load. I attached a picture of it. How can I configure the internal load capacitor of the TLSR8251 that is mentioned in the datasheet? At https://doc.telink-semi.cn/doc/e ... n_en/#other-modules it's mentioned how to configure the capacitor for the 24 MHz crystal but not how to configure the capacitor of the 32.768 kHz crystal.

Crystal.png
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Telink forum ( 沪ICP备17008231号-1 )

GMT+8, 2025-8-17 19:52 , Processed in 0.172416 second(s), 21 queries .

Powered by Telink 隐私政策

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

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