How do I configure custom_config_qspi.h given that my circuit has no 16khz crystal?
在切换到内部晶体之前,系统似乎尝试使用16kHz晶体。几秒钟后,该应用程序与“未处理的例外”关闭。由于这个董事会没有16khz水晶和发展子板,我假设这是问题。
The code works perfectly on the deveopment daughter board but fails on my board with no 16khz crystal.
I've changed this setting from LP_CLK_32000 to:
#definedg_configUSE_LP_CLK LP_CLK_RCX
but the issue remains.
Device:
嗨Ddustin,
我认为您已创建一个类似的论坛线程:
https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-hardware-device-reference-designs/chip-seemingly
在custom_config_qspi.h中,您可以定义系统的低功耗(LP)时钟。
Could you please clarify if you 16KHz or 16MHz? In case you mean 16KHz, this is not possible to be achieved, because for LP we are using a clock at 32.768KHz. The LP clock is been using when the system goes in to sleep mode. Except from the LP, you should have a system clock which will be running when the device is in active mode. The system clock should be defined in system_init() function.
In case you are using an external XTAL16:
请从SDK的PXP_Reporter示例中查看System_init()函数。如果您不想拥有外部水晶振荡器,则应使用SysClk_RC16替换SysClk_XxtAl16M。
I would strongly recommend you to have a look at Figure 21: Wake/Power-Up timing and PMU operations of DA14682 datasheet.
Thanks, PM_Dialog
Hi,
啊,是的,是的,我正在使用16MHz主水晶,但没有睡觉的水晶。所以我在Config中指定了此设置以使用内部水晶睡眠:define dg_configuse_lp_clk lp_clk_rcx。
I took the ble_peripheral example code and ran it on both the daughter dev board and my own board, painstakingly removing pieces of the code and putting them back until I found the specific line that breaks on my board but not the daughter board. I changed this line from FOREVER to NOWAIT.
ret = OS_TASK_NOTIFY_WAIT(0, OS_TASK_NOTIFY_ALL_BITS, ¬if, OS_TASK_NOTIFY_NO_WAIT);
// ret = OS_TASK_NOTIFY_WAIT(0, OS_TASK_NOTIFY_ALL_BITS, ¬if, OS_TASK_NOTIFY_FOREVER);
这似乎纠正了这个问题(尽管通过浪费吨循环)。我相信这意味着睡眠在我的董事会上失败了。同样将睡眠模式更改为空闲而不是扩展睡眠恢复问题。浪费多少力量?
pm_set_sleep_mode(pm_mode_idle.);
// pm_set_sleep_mode(pm_mode_extended_sleep);
Whats the best way to diagnose this further? Is it possible this particular chip has a faulty internal crystal — if so how would I check?
谢谢你的帮助。
Edit: Visually comparing the daughter board and my board -- the biggest difference is the size of the L1 inductor. I used a physically much smaller inductor on my board. Is it possible that would screw up something with the DC-DC while the device is asleep?
嗨Ddustin,
Let me check your issue and I will get back to you as soon as possible.
Thanks, PM_Dialog
嗨Ddustin,
OS_TASK_NOTIFY_FOREVER attribute, will force the underlying task to enter the BLOCKED state for as long as there are not pending notifications. If there is no other task in active mode, the IDLE special task will be executed, and the device will enter sleep mode. In addition, the task will be executed as soon as a notification comes either from the BLE manager or the code itself. So, your statement is wrong.
PM_SET_SLEEP_MODE(PM_MODE_IDLE)将仅在没有任何需要CPU干扰的功能时将M0 +核心设置为空闲状态。
While the chip is in sleep mode, the DC-DC will be de-activated and only the LDOs are powered on. Please, check the Figure 11: Power management unit block diagram in DA14682 datasheet. Only the red bocks are activated in sleep mode. The green blocks are activated / de-activated per user’s requirements.
Thanks, PM_Dialog
好的,那很好。
Now why does the example provided by you guys, ble_peripheral, *NOT* work? I described the issue earlier but I will describe it again.
当设备进入OS_TASK_NOTIFY_FOREVER时,程序将在预约3秒内寄出。
This is solved by changing the sleep mode to pm_mode_idle.
其他睡眠模式不*工作。为什么他们不起作用?我们如何调查他们为什么不起作用?
Please help. Telling me me statement is wrong is not helpful!! Tell me how to actually investigate the issue please!
嗨Ddustin,
我在Pro-DK中运行了SDK1.0.14.1081的BLE_PERIENTAL示例,其中包含内部RCX,它完美地工作。SDK的默认示例是完全正常的。您也可以在Pro-DK中澄清它,并使用BLE_Peripheral项目,而无需在清洁的SDK路径中进行任何修改。只需将LP_CLK_32768从LP_CONFIGUSE_LP_CLK宏更改为LP_CLK_RCX。此外,我建议您只能在您的自定义板中的上述修改运行相同的项目。如果它在Pro-DK中工作而不在您的自定义板中工作,这意味着您的自定义板上的硬件问题,而不是在DA14682 SOC中。因此,我的建议是审查自己的董事会。
You could read theAN-B-061 Application Note: DA1468x Application Hardware Design Guidelines从我们的支持门户为了找到硬件design guidelines that will help you to review your schematics and PCB. If you were able to share your schematics and PCBs, I would be more than happy to review them.
Thanks, PM_Dialog