Hi,
I have a custom board with XTAL16M connected and no XTAL32K connected. When I run ble_app_sleepmode example in non_connectable mode, WDOG timeout happens and come into the function/routine NMI_HandlerC.
当我评论da1458x_config_basic.h中的行#define cfg_wdog时,我注意到代码留在(!ble_deep_sleep_stat_getf());永远。
I cannot use RCX20 either. The code complains.
我如何在没有连接XTAL32K的情况下解决此问题?
I am using SDK 6.0.10.511
Thank you,
Anushiya
Device:
Hi anushiya,
由于您的自定义板上没有XTAL32,因此您应该在睡眠状态时切换RCX的低功耗时钟。请检查da1458x_config_advanced.h文件并将cfg_lp_clk从lp_clk_xxtal32更改为lp_clk_rcx20。此外,请记住,XTAL16M自适应算法仅使用XTAL23K工作而不是RCX,作为LP时钟,因此您应该拒绝CFG_XTAL16M_ADTIVE_SETTLING宏检查DA1458X_CONFIG_ADVANCE.H文件。关于WDOG,您不应该发表评论,因为它是SDK定义,并且您将无法建立您的项目。如果您不想使用它,您应该删除它。但是,如果WDOG被禁用,并且您的固件卡在某个地方,那么WDOG将永远不会击中。因此,我的建议是保持WDOG为您的调试启用。
Thanks, PM_Dialog
>Regarding the WDOG, you should not comment it out, since it’s SDK definition and you will not be able to build you project. If you don’t want to use it, you should undefine it. However, if the WDOG is disabled and your firmware gets stuck somewhere, you the WDOG will never hit. So, me recommendation is to keep the WDOG enabled for your debugging.
As I mentioned in the original message, this was done temporarily to see what is happening.
>In addition, keep in mind that the XTAL16M adaptive settling algorithm works only with XTAL23K and not with RCX, as the LP clock, so you should undefine the CFG_XTAL16M_ADAPTIVE_SETTLING macro check da1458x_config_advanced.h file.
How will it affect the system when it is in non-connectable configuration? Will the power consumption affected? what is the benifit of "the XTAL16M adaptive settling algorithm"?
Hi,
When I did the suggested approach above, I am facing a new problem related to the above solution.
(I am using DA14586 with 6.0.10.511 SDK. Modified the code ble_app_sleepmode to non_connectable modewith the advice inhttps://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-hardware-device-reference-designs/mnfdata-update#comment-24042.
No external interrupts possible. Sleep inbetween advertisements and need to wake up automatically)
The system transmitted for about 20 minutes and then went into assert warning in the below line in rwble.c.
#if(use_xtal16m_adaptive_settling)
if(( && ()) && ()) { }
#else
if(development_debug)
/ /如果这个断言击中LP ISRlasts longer than the time
// that has been reserved via LP_ISR_TIME_XTAL32_CYCLES and LP_ISR_TIME_USEC.
if (sleep_lp_cycles && (sleep_lp_cycles < slp_period))
ASSERT_WARNING(0); //(it entered here)
#endif
So I changed the definition of LP_ISR_TIME_XTAL32_CYCLE to (127) (from 110) and LP_ISR_TIME_USEC to (3876) (from 3357).
It hang in the line
//wait until BLE core de-asserts the LP IRQ
while (GetWord16(GP_CONTROL_REG) & BLE_WAKEUP_LP_IRQ) ;
如何克服这种情况。
我在看https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/some-porblem-sleep-mode.
Still not sure how to overcome this problem.
Hi anushiya,
Can you please indicate if you have the following configurations?
您能否澄清“不可能的外部中断”吗?您的意思是您停止广告 - 将您的设备放在永久睡眠模式中,您无法通过唤醒控制器唤醒它?
Thanks, PM_Dialog
I fixed this problem:
The reason was I had my custom board accelerometer initialising code inside periph_init function in use_periph_setup.c file and due to the initialisation time was longer than allowed, it caused problem.
I had to leave the SPI bus initialisation in there and move the rest to user_app_init in user_sleepmode.c and then the system works fine.
To answer your question below, Yes I have them all along.
>Can you please indicate if you have the following configurations?
> #undefCFG_XTAL16M_ADAPTIVE_SETTLING
> #define cfg_lp_clk lp_clk_rcx20(因为您的董事会中没有XTAL32K)