DA14585 SleepMode代码在OTP后卡住了

⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
39帖子/ 0新
Last post
markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
DA14585 SleepMode代码在OTP后卡住了

您好对话团队,

I am using a custom board for my project.

该项目具有压力传感器,通过GPIO每30秒发送曼彻斯特编码数据。我的对话框芯片对数据进行解码并将其加载到广告字符串中。我有一个电池,用于向上电我的电路。我可以睡觉以节省电池寿命。

到目前为止,我已经完成了以下内容。由于我们正在开发自定义硬件,因此我对示例(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)#undef cfg_code_location_ext和#define cfg_code_location_otp在da1458x_config_advanced.h中

我已成功使用585devkit调试项目,而且没有任何问题。我现在面临以下问题。由于我的调试会话正常运行,我计划执行OTP。在我做了OTP之后,程序不会运行很长时间。它运行了一段时间,然后暂停停止。不知道为什么。

问候,

标记

设备:
markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
我正在附上这个项目

我正在附上这个项目folder also.

Attachment:
PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
嗨Kuda,

嗨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

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

是的。我将代码下载到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.

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
hi markdsylva_2277.

hi markdsylva_2277.

您能否导出和分享您正在使用的OTP标题?

Thanks, PM_DIalog

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

How to export OTP header?

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
hi markdsylva_2277.

hi markdsylva_2277.

来自SmartSnippets工具箱。您需要连接到OTP标题并将其导出到文件。

Thanks, PM_Dialog

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

I am getting a lot of errors while reading.

I am attaching the log.

问候,

标记

Attachment:
markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
Hi PM_dialog,

Hi PM_dialog,

I managed to get the header. Its attached here.

问候,

标记

Attachment:
markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

请更新我的状态,因为我正在等待您在项目中进一步发展的回复。

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Hi Mark,

Hi Mark,

两个应用程序标志都设置为正确的“是”。您使用的包裹是什么?WLCSP34,QFN40或QFN48?我选择了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

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

--->您使用的包裹是什么?WLCSP34,QFN40或QFN48?我选择了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后发现错误后,我就会更好。我将被问到我的管理员关于多少筹码你会浪费多少?

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Hi Mark,

Hi Mark,

您提到您在开发模式下测试了项目。请记住,当附加调试器时,这可以防止系统进入睡眠模式。你有没有附上调试器的测试?

您的问题与睡眠模式的唤醒是相关的。

例如,如果您将相同的FW下载到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

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

--->您提到您在开发模式下测试了您的项目。请记住,当附加调试器时,这可以防止系统进入睡眠模式。你有没有附上调试器的测试?

我试图通过按相同的调试按钮开始从keil启动调试会话并停止调试会话。代码没有运行。

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?

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Hi Mark,

Hi Mark,

所以问题与SW相关。让我们试着调查根本原因的原因。如果您使用附加调试器运行自定义板中的应用程序代码,则停止任何地方吗?如果是,请您能分享一个截图卡住的屏幕截图吗?看门狗是否已禁用ORE?

Thanks, PM_Dialog

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

- >否。代码不停止任何地方。它没有任何问题。

--> I have disabled the watchdog.

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Hi Mark,

Hi Mark,

您能用WDOG运行它吗?现在,如果在调试模式下运行它,代码在任何地方粘在一起?请定义CFG_WDOG宏并再次运行它。

Thanks, PM_Dialog

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Hi Mark,

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

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

我使用的SDK是6.0.12

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Hi Mark,

Hi Mark,

我的建议是将启用WDOG并在调试模式下运行代码。此外,请启用CFG_Development_debug标志。这允许您热连接调试器,并且如果发生硬盘或NMI,则获取调试信息。所以,通过启用这2个宏,在调试模式下毁了它时会粘在任何地方?另外,不需要禁止OTP才能调试它 - 只需将固件下载到系统内通过Keil IDE。

与此同时,我将尝试在我们的开发板上运行附加的项目。

Thanks, PM_Dialog

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

I did as you said.

我#Defined宏并按下调试按钮,然后再次按下相同的按钮。代码再次陷入困境。

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Hi Mark,

Hi Mark,

Where it gets stuck? Can you please share a screenshoot?

Thanks, PM_Dialog

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

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?.

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Hi Mark,

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和开发调试,否则,如果代码粘在某个地方,您将永远不会通知此!总之,刻录OTP图像和OTP标题要求应用程序代码运行100%。否则,芯片将永远不会启动表单OTP!

您正在使用的DA14585的包是什么?

Thanks, PM_Dialog

Attachment:
markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

Ok. I will do as you said.

我正在使用qfn40包。

GPIO预留问题会导致代码挂起OTP后挂起吗?

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Since you are running the

由于您在调试模式下运行项目,因此您应该定义CFG_Development_debug。这允许您模拟从OTP到系统RAM的OPT镜像。

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
我建议跑

我建议在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%?

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

我从你的Skd拍摄了一份新鲜的SleepMode示例,并试图将其下载到585女儿板中的RAM。我没有在任何代码中修改任何内容。当我按下调试按钮并启动时,它立即在NMI_Handler停止。您的示例代码是否会在585女儿板上进行修改?

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
嗨Mark,请下载

嗨Mark,请下载fw into RAM first - is that working now?

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
嗨,马克,你能忘吗

嗨,马克,你能说明你用的是哪个dk?哪个子板和哪个母板?是的,该示例正常工作..

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
你好,

你好,

Kit is DA14580DevKT-P_VC

Daughter board is DA14585.

问候

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Hi Mark, Yes the ble_app

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?

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
你好,

你好,

Photos are attached.

问候,

标记

Attachment:
PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Hi Mark, Just tested the ble

嗨,马克,只是测试了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

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20
嗨pm_dialog,

嗨pm_dialog,

--->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项目并建立并启动调试会话。我没有修改里面的任何东西。但我面临着同样的问题。我附上了截图。

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Hi Mark, are you able to run

HI Mark,您是否能够运行其他其他SDK项目?例如,BLE_APP_BAREBONE。所有SDK示例都在我们的DKS出框中运行,并且由SDK提供。在这个特定的设备中,你烧了OTP吗?

markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20

你好,

I am not able to run any ble examples. I tried the blinky project. It worked fine.

问候,

标记

PM_Dialog
离线
Last seen:21小时43分钟前
Staff
Joined:2018-02-08 11:03
Hi Mark,

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

Attachment:
markdsylva_2277.
离线
Last seen:3个月1周前
Joined:2019-06-19 04:20

嗨pm_dialog,

我试过你说的。

1)我拍出了SDK的新鲜副本,并在D驱动器中创建了一个文件夹。我在没有修改任何内容的情况下运行sleepMode示例。一旦我开始调试会话,它就被困在NMI处理程序。

2)连接智能片段工具并检查读取OTP内存。它只读零。

问候,

标记