没有cfg_development_debug重新启动

了解更多常见问题解答教程

15 posts / 0 new
最后一篇
螺旋
离线
最后一次露面:3 months 3 weeks ago
加入:2019-04-25 10:22
没有cfg_development_debug重新启动

I have a custom board where I adapted the example ble_app_all_in_one for my application. I use ARCH_EXT_SLEEP_OTP_COPY_ON. Everything works so far, but when I disable CFG_DEVELOPMENT_DEBUG, the device consistently reboots after a few seconds.

任何暗示可能正在发生的内容?

Device:
PM_DIALOG.
离线
最后一次露面:13小时13分钟前
员工
加入:2018-02-08 11:03
嗨螺旋,

嗨螺旋,

This macro enables the development/debug mode. For production mode builds it must be disabled. Please define this macro and run your code in debug mode. Does your firmware get crashed?

谢谢,PM_DIALOG.

螺旋
离线
最后一次露面:3 months 3 weeks ago
加入:2019-04-25 10:22
是的,当我定义这个宏时

是的,当我定义此宏时,所有操作都有效(无崩溃)。

我想为生产模式禁用它,但后来它在大约两秒钟后崩溃并重新启动 - 但只有当我将其刻录到闪存时,就不会在调试器中运行它时。

我在OTP中刻录了引导加载程序。

PM_DIALOG.
离线
最后一次露面:13小时13分钟前
员工
加入:2018-02-08 11:03
嗨螺旋,

嗨螺旋,

那么,你打算燃烧OTP并从那里启动吗?启用CFG_Development_debug时,它允许将OTP镜像仿真到系统RAM。你能澄清你在OTP中刻录哪个引导加载程序吗?如果将睡眠配置更改为Arch_ext_sleep_on,您还在面临同一问题吗?

谢谢,PM_DIALOG.

螺旋
离线
最后一次露面:3 months 3 weeks ago
加入:2019-04-25 10:22

我们的HW制造商在OTP中刻录了一个引导加载程序,我们从那里启动,闪存中没有引导加载程序。不幸的是,我不知道它是哪个引导加载程序,但我怀疑它是漂亮的标准(但也许是一个较旧的SDK?)......

当我使用ble_app_all_in_one时,问题也会发生。我只添加了一个LED输出,看看FW何时运行,它何时重新启动...使用CFG_Development_debug启用所有工作效果很好。但是,当我禁用CFG_DEVELIMENT_DEBUG时,它每隔5秒重新启动一次。如果我通过BLE Quicky连接,在5秒之前,只要我保持连接,它就不会重启。一旦我断开连接,几秒钟后会重新启动。

这与ARCH_EXT_SLEEP_OTP_COPY_ON以及ARCH_EXT_SLEEP_ON ...

PM_DIALOG.
离线
最后一次露面:13小时13分钟前
员工
加入:2018-02-08 11:03
嗨螺旋,

嗨螺旋,

你能分享你所做的修改吗?请尝试使用SDK的BLE_APP_BAREBONE示例而无需休眠模式,并将CFG_DEVELVELMMENT_DEBUG未定义。从Flash启动时,您是否有同样的问题?请尝试从System-RAM启动。

谢谢,PM_DIALOG.

螺旋
离线
最后一次露面:3 months 3 weeks ago
加入:2019-04-25 10:22
我有唯一的修改

我对BLE_APP_ALL_IN_ONE项目的唯一修改以及BLE_APP_BAREBONE正在将这些行添加到user_periph_setup.c gpio_reservations()和set_pad_functions()以关闭电路板LED。Bootloader打开所有三个LED,因此我可以看到重新启动时LED的状态发生。

#定义GPIO_RED_LED_PORT GPIO_PORT_0 #定义GPIO_RED_LED_PIN GPIO_PIN_2 #define GPIO_GREEN_LED_PORT GPIO_PORT_2 #define GPIO_GREEN_LED_PIN GPIO_PIN_5 #define GPIO_BLUE_LED_PORT GPIO_PORT_2 #define GPIO_BLUE_LED_PIN GPIO_PIN_9 RESERVE_GPIO(LED, GPIO_RED_LED_PORT, GPIO_RED_LED_PIN, PID_GPIO); RESERVE_GPIO(LED, GPIO_GREEN_LED_PORT, GPIO_GREEN_LED_PIN, PID_GPIO); RESERVE_GPIO(LED, GPIO_BLUE_LED_PORT, GPIO_BLUE_LED_PIN, PID_GPIO); GPIO_ConfigurePin(GPIO_RED_LED_PORT, GPIO_RED_LED_PIN, OUTPUT, PID_GPIO, true); GPIO_ConfigurePin(GPIO_GREEN_LED_PORT, GPIO_GREEN_LED_PIN, OUTPUT, PID_GPIO, true); GPIO_ConfigurePin(GPIO_BLUE_LED_PORT, GPIO_BLUE_LED_PIN, OUTPUT, PID_GPIO, true);
  • BLE_APP_BAREBONE在没有睡眠模式和CFG_DEVELOPMENT_DEBUG未定义的工作
  • BLE_APP_ALL_IN_ONE在没有睡眠模式和CFG_DEVELOPMENT_DEBUG未定义的工作
  • ble_app_all_in_one with ARCH_EXT_SLEEP_ON and CFG_DEVELOPMENT_DEBUG undefined reboots every 5 seconds
  • ble_app_all_in_one with ARCH_EXT_SLEEP_ON and CFG_DEVELOPMENT_DEBUG defined works
  • ble_app_all_in_one with ahrac_ext_sleep_on和cfg_development_debug未定义和exted bootloader每5秒重新启动

问题:

  • 如何强制系统从闪存启动系统?
  • How can I boot from System-RAM without using a debugger?

PM_DIALOG.
离线
最后一次露面:13小时13分钟前
员工
加入:2018-02-08 11:03
嗨螺旋,

嗨螺旋,

你做have a custom board, or you are using any of our development kits? Since the both of projects are working in active mode and having the CFG_DEVELOPMENT_DEBUG undefined, I guess that the problem might be related with the sleep mode. Which clock are you using as a Low Power clock?

  • 如果我有问题,我不确定,但在这种情况下,您应该使用SmartSnippets Toolbox的Flash程序员刻录SPI Flash。
  • 您可以通过Keil下载固件。

谢谢,PM_DIALOG.

螺旋
离线
最后一次露面:3 months 3 weeks ago
加入:2019-04-25 10:22
是的,显然问题是

是的,显然问题是related to the sleep mode.

The problem happens on a custom board, as stated above. The custom board has the OTP burned.

我还有一个基本的开发套件,有问题不会发生,但OTP也没有在那里烧毁。

我的OTP标题表示睡眠时钟源=外部水晶。HW文档还确认32K辅助器用作扩展睡眠模式的时钟。也许我在应用程序中没有正确配置?检查什么?

Of course I can burn the SPI flash, but if I burn the bootloader to flash and OTP is burned too, will it use the bootloader in flash? It seems not, I have also tested that today. The problem also happens when I burn the bootloader to Flash.

当我通过调试器下载通过keil的固件。使用调试器时不会发生问题。是否有任何方法可以通过keil下载固件,然后分离调试器?

螺旋
离线
最后一次露面:3 months 3 weeks ago
加入:2019-04-25 10:22
好的,我已经追溯到了

好的,我已经将其追溯到Arch_Main.c中的以下两行:

setbits16(sys_ctrl_reg,dev_phase,1);保留_ram_blocks = ret_mode;

如果存在这些,就像定义了Developing_debug时,没有崩溃/重启。

PM_DIALOG.
离线
最后一次露面:13小时13分钟前
员工
加入:2018-02-08 11:03
嗨螺旋,

嗨螺旋,

According to DA14585 datasheet, the DEV_PHASE bitfield of the SYS_CTRL_REG, sets the development phase mode. If this bit is set, in combination with the OTP_COPY bit, the OTP DMA will emulate the OTP mirroring to System RAM. No actual writing to RAM is done, but the exact same amount of time is spent as if the mirroring would take place. This is to mimic the behavior as if the System Code is already in OTP, and the mirroring takes place after waking up, but the (development) code still resides in an external source. If this bit is set to '0' and OTP_COPY='1', then the OTP DMA will actually do the OTP mirroring at wakeup.

因此,在具有开发阶段模式时,代码在所有情况下都正确运行?

谢谢,PM_DIALOG.

螺旋
离线
最后一次露面:3 months 3 weeks ago
加入:2019-04-25 10:22
Yes, this is what I said

Yes, this is what I said above. And yes, I have read the datasheet.

PM_DIALOG.
离线
最后一次露面:13小时13分钟前
员工
加入:2018-02-08 11:03
嗨螺旋,

嗨螺旋,

Thank you for your indication.

Regards, PM_Dialog

螺旋
离线
最后一次露面:3 months 3 weeks ago
加入:2019-04-25 10:22
有关此问题的任何消息?你做

有关此问题的任何消息?你认为我应该只在生产建设中启用这个标志吗?对我来说,这个问题尚未解决。这可能是一个最佳替代方法。

PM_DIALOG.
离线
最后一次露面:13小时13分钟前
员工
加入:2018-02-08 11:03
嗨螺旋,

嗨螺旋,

您是否在BLE_APP_ALL_IN_ONE项目中完成了任何其他修改?默认SDK在广告期间使用OTP副本使用扩展睡眠模式。请检查user_app_adv_start()。如果您有cfg_development_debug,我假设您应该刻录OTP。但是,请注意,OTP代表一个时间可编程,因此您无法多次擦除并重新编写OTP,但您只能将仍设置为0的位并将其转换为1。

谢谢,PM_DIALOG.