您好对话团队,
I am using a custom board for my project.
这个项目有一个压力传感器,发送manchester coded data every 30sec through gpio. My dialog chip decodes the data and loads it in the advertisement string. I have a battery attached for powering up my circuit. I am enabling sleep to save battery life.
到目前为止,我已经完成了以下内容。由于我们正在开发自定义硬件,因此我对示例(BLE_APP_SLEEPMODE)程序进行了以下更改,如下所示。
1) Changed the led port and button pin as per our schematic in user_periph_setup.h
2) Changed #define CFG_LP_CLK LP_CLK_XTAL32 to #define CFG_LP_CLK LP_CLK_RCX20 in da1458x_config_advanced.h, since we dont have a 32Khz external crystal.
3)因点2而将#define cfg_xtal16m_adaptive_settling更改为#undef cfg_xtal16m_adaptive_settling。
4) #在da1458x_config_advanced.h中定义CFG_CODE_LOCATION_EXT和#define CFG_CODE_LOCATION_OTP
我已成功使用585devkit调试项目,而且没有任何问题。我现在面临以下问题。由于我的调试会话正常运行,我计划执行OTP。在我做了OTP之后,程序不会运行很长时间。它运行了一段时间,然后暂停停止。不知道为什么。
当做,
作记号
我附上该项目folder also.
嗨Kuda,
谢谢你的问题。
>>>> I am facing the following problems now. Since my debug session is running properly I have planned to do the OTP.
Do you mean that you have the debugger attached? If yes, this prevents the system to go into sleep mode. Are you completely sure that your application is running in our DK?
如果您的定制板,您是否尝试在调试模式下运行您的应用程序?例如,您是否尝试将FW下载到System-RAM?
Thanks, PM_Dialog
嗨,PM\U对话,
对。我把代码下载到sys-RAM,它运行得很好,没有任何问题。
After I downloaded the code to OTP, I disconnected the debugger. I removed the battery and inserted it back. It runs for a few minutes and then it gets stuck.
当做,
作记号
hi markdsylva_2277.
您能否导出和分享您正在使用的OTP标题?
Thanks, PM_DIalog
嗨,PM\U对话,
How to export OTP header?
当做,
作记号
hi markdsylva_2277.
从SmartSnippets工具箱。您需要连接到OTP头并将其导出到文件。
Thanks, PM_Dialog
嗨,PM\U对话,
I am getting a lot of errors while reading.
I am attaching the log.
当做,
作记号
Hi PM_dialog,
I managed to get the header. Its attached here.
当做,
作记号
嗨,PM\U对话,
请更新我的状态,因为我在等待你的答复,为进一步发展我的项目。
当做,
作记号
Hi Mark,
两个应用程序标志都设置为“是”,这是正确的。你用的是什么包装?WLCSP34、QFN40或QFN48?I您选择的QFN40的OTP头。此外,时钟源被选为外部晶体振荡器,但在您的初始岗位上,您使用的是间隔RCX。你在OTP标题中做了哪些更改?您是否烧毁了“设备和包”和“睡眠时钟源”或它是默认配置?
>>>将代码下载到OTP后,我断开了调试器的连接。我把电池取下来插回去。它跑了几分钟就卡住了。
Since it is running for a few minutes, this means that the device is booting correctly from the OTP. Probably the issue might be related to the SW. Does the device advertise and stops suddenly? Are you able to connect it with a peer device?
Thanks, PM_Dialog
嗨,PM\U对话,
--->你用的是什么包装?WLCSP34、QFN40或QFN48?I您选择的QFN40的OTP头。
是的,它是qfn40。
---->此外,时钟源被选为外部晶体振荡器,但在您的初始岗位上,您使用的是间隔RCX。你在OTP标题中做了哪些更改?您是否烧毁了“设备和包”和“睡眠时钟源”或它是默认配置?
I have an external crystal connected. But for low power crystal selection I dont have a 32Khz external crystal connected to my dialog chip. So I changed it from #define CFG_LP_CLK LP_CLK_XTAL32 to #define CFG_LP_CLK LP_CLK_RCX20. I didnt change anything else in the header. I only changed the application flags to Yes.
----> Since it is running for a few minutes, this means that the device is booting correctly from the OTP. Probably the issue might be related to the SW. Does the device advertise and stops suddenly? Are you able to connect it with a peer device?
这些设备运行几分钟,当它从睡眠停止时醒来。应用程序的运行时间变化很大。Somtips它在2分钟内停止或可能需要15分钟。由于我的项目仅与广告有关,因此我并没有将其与对等设备连接。如果问题与软件有关,为什么在调试期间会出现它?
-------------------------------------------------------------------------------------------------------------------------
-> My biggest doubt is, if there is a bug in the application, why does it run for a certain amount of time and then stops.
- >我有一个移动应用程序,用系统时间记录广告数据。根据我的项目,广告间隔是150ms,它在广告停止后5秒钟完成。根据我的日志,芯片在广告停止前5秒钟之间唤醒并停止。
-> I also read from a online tutorial in your website, that the following line should be commented from rwip.c. if not using 32Khz external crstal
// Boost mode + RCX is not supported in DA14585/586
if (GetBits16(ANA_STATUS_REG, BOOST_SELECTED) == 1)
assert_warning(0);
I didnt try commenting this because I dont have many chips left with me as we are in lockdown due to Covid-19. My code ran in debug for more than a week straight. After I did OTP I started facing problems. Please support me on this as it is very urgent.
-----------------------------------------------------------------------------------------------
如果你能在某些方面指导我会更好,因为我使用的是定制板,我只是不能浪费芯片后发现错误后,做了OTP。我的经理会问我,你会为此浪费多少芯片?。
当做,
作记号
Hi Mark,
您提到您在开发模式下测试了您的项目。请记住,连接调试器时,这会阻止系统进入睡眠模式。您是否曾经在没有附加调试程序的情况下进行过测试?
你的问题与从睡眠模式中醒来有关。
例如,如果您将相同的固件下载到Sys-Ram(没有附加调试器)或SPI-Flash中,那运行是否正确?
Regarding the OTP Header seems to be correct. If the OTP Header and the OTP Image were not burnt correctly, the device will not be able to boot! In your case, the DA14585 is booting correctly and starts advertising.
Thanks, PM_Dialog
嗨,PM\U对话,
--->您提到您在开发模式下测试了您的项目。请记住,连接调试器时,这会阻止系统进入睡眠模式。您是否曾经在没有附加调试程序的情况下进行过测试?
我试图从keil启动调试会话,并通过按相同的debug按钮停止了调试会话。代码没有运行。
As I had said in the above post, I think the code hangs somewhere in the middle of the advertisement process (ie Waking up and sleeping between advertisemnt intervals). My code is in the user_sleepmode.c file, where I am handling the external interrupt and data decoding. After I receive the data, I start the advertisement and set an app_easy_timer for 5 seconds....after which I stop the advertisement. In between I dont have anything. How am I to check where the code hangs?. Any ideas?
当做,
作记号
Hi Mark,
所以这个问题和软件有关。让我们试着调查一下根本原因。如果在安装了调试器的自定义板上运行应用程序代码,它会在任何地方停止吗?如果是的话,你能分享一个截图吗?看门狗是启用还是禁用?
Thanks, PM_Dialog
嗨,PM\U对话,
- >否。代码不停止任何地方。它没有任何问题。
--> I have disabled the watchdog.
当做,
作记号
Hi Mark,
您能用WDOG运行它吗?现在,如果在调试模式下运行它,代码在任何地方粘在一起?请定义CFG_WDOG宏并再次运行它。
Thanks, PM_Dialog
Hi Mark,
Additionally what is the SDk that you are using? I am unable to build the provided example code in our SDK.
Thanks, PM_Dialog
嗨,PM\U对话,
我使用的SDK是6.0.12
当做,
作记号
Hi Mark,
我的建议是将启用WDOG并在调试模式下运行代码。此外,请启用CFG_Development_debug标志。这允许您热连接调试器,并且如果发生硬盘或NMI,则获取调试信息。所以,通过启用这2个宏,在调试模式下毁了它时会粘在任何地方?另外,不需要禁止OTP才能调试它 - 只需将固件下载到系统内通过Keil IDE。
同时,我将尝试在我们的开发板上运行所附的项目。
Thanks, PM_Dialog
嗨,PM\U对话,
I did as you said.
我#定义了两个宏,并通过按“调试”按钮上传了代码,然后再次按同一按钮。代码又卡住了。
当做,
作记号
Hi Mark,
Where it gets stuck? Can you please share a screenshoot?
Thanks, PM_Dialog
嗨,PM\U对话,
I have disconnected the debugger. So I am not able to see where its getting stuck.
但是当我使用调试器运行时,代码正常运行。
------------------------------------------------------------------------------------
I am having a deadline to complete the project by tomorrow, and since the code is getting stuck between advertisement intervals, I am thinking of removing the otp copy sleep between advertisement intervals by passsing false to arch_set_extended_sleep(false) and changing the static const sleep_state_t app_default_sleep_mode = ARCH_EXT_SLEEP_ON...
Will this solve my issue for time being?.
当做,
作记号
Hi Mark,
我已经使用CFG_Wdog和CFG_Development_debug宏运行附加项目。我正在研究一个QFN40女儿板和我们的新款Pro-DK主板。为了使用板载按钮唤醒设备,我正在使用LED的P1_1。
When running the code in debug mode, it gets stuck in GPIO_SetPinFunction() in gpio.c file in the following line.
__asm("BKPT #0\n"); // this pin has not been previously reserved!
In user_periph_setup.c you are configuring all the GPIOs to input pull down. This is not need as the default state is INPUT_PULLDOWN. You can easily read the GPIOs registers to clarify it. Additionally this peace of code reconfigures all the GPIOs which is not recommend.
此外,在user_sleepmode.c文件中,您正在使用永不保留的GPIO!
Please find attached a diff file with the modifications I did in your code. With that modifications I am able to run your project in our DKs.
OTP代表一次性可编程,所以你应该确保你的项目是完全运行前燃烧它!
在开发阶段,建议启用WDOG和development debug,否则,如果代码被困在某个地方,您将永远不会收到通知!总之,刻录OTP映像和OTP头需要应用程序代码100%运行。否则,芯片将永远无法从OTP启动!
您正在使用的DA14585的包是什么?
Thanks, PM_Dialog
嗨,PM\U对话,
Ok. I will do as you said.
我正在使用qfn40包。
GPIO预留问题会导致代码挂起OTP后挂起吗?
当做,
作记号
由于您在调试模式下运行项目,因此您应该定义CFG_Development_debug。这允许您模拟从OTP到系统RAM的OPT镜像。
我建议在DK中运行项目。它是否正确运行?
If yes, then use your custom board and download the FW into System-RAM. Please make sure that OTP is empty. Is that working 100%?
嗨,PM\U对话,
我从你的skd上取了一个新的sleepmode示例,并尝试将其下载到585子板的ram中。我没有修改任何代码。当我按下debug按钮并启动代码时,它立即在nmi\u处理程序中停止。在585子板中,您的示例代码是否可以这样工作而不进行修改?。
当做,
作记号
嗨Mark,请下载fw into RAM first - is that working now?
你好,马克,你能指出你用的是哪种DK吗?哪个子板和哪个母板?是的,这个例子是正确的。。
你好,
Kit is DA14580DevKT-P_VC
Daughter board is DA14585.
当做
Hi Mark, Yes the ble_app_sleepmode is runnign correctly in this board. I can run it in my side. Would it be possible to share a phote with the jumpers configuration?
你好,
Photos are attached.
当做,
作记号
嗨,马克,只是测试了ble_app_sleepmode例子on our DK - I am using the same DK with you and the same jumper configuration. Do you have any spare DK to test it? I'd suggest to worki on a clean SDK directory as well. Additionally, with the modification i had shared you yesterday, I am able to run your project in our DK... Are you building the project for DA14585? Thanks, PM_Dialog
嗨,PM\U对话,
--->Do you have any spare DK to test it?
不,我没有。
--> I'd suggest to worki on a clean SDK directory as well.
我从6.0.12.1020.2..zip文件中提出了SDK文件夹,然后打开BLE_APP_SLEEPMODE项目并建立并启动调试会话。我没有修改里面的任何东西。但我面临着同样的问题。我附上了截图。
当做,
作记号
嗨,马克,你能运行其他SDK项目吗?例如,ble\u app\u barebone。所有的SDK示例都是在我们的DKs中运行的,并且是由SDK提供的。在这个特定的设备中,你烧过OTP吗?
你好,
I am not able to run any ble examples. I tried the blinky project. It worked fine.
当做,
作记号
Hi Mark,
Please find attached my jumper configuration. All the BLE examples are running as expected. In case of ble_app_sleepmode, I am able to run it with the attached configuration. So please, try to unzip the SDK into a new folder and give again a try. I would suggest to have a short SDK path – probably unzip in under the C:\ . If it Is not running again, probably the board is damaged. Have you written the OTP in that device?
Thanks, PM_Dialog
嗨,PM\U对话,
我照你说的做了。
1)我拍出了SDK的新鲜副本,并在D驱动器中创建了一个文件夹。我在没有修改任何内容的情况下运行sleepMode示例。一旦我开始调试会话,它就被困在NMI处理程序。
2) 我连接了smart snippets工具并检查了OTP内存的读取。它只读0。
当做,
作记号