你好支持,
我正在考虑使用DA 14585的外部中断输入来异步返回(从Exted睡眠)使用外部MPU。
I am referring to the document (Training_04_Sleep mode configurations and power measurement_0.pdf). (Page 9)
SDK :6.0.8.509.
外部MPU和DA 14585使用SPI I / F连接。
I have two questions.
Q1。在exteded睡觉期间
Keil-UVISION调试操作和实际操作之间的行为不同。
当DA 14585未通信时,首先我设置为“Exted Sleep”,并使用端口中断将动作从休眠状态从恢复DA 14585设置。
返回后,我想立即与SPI进行沟通。那
在UVISION和J-LINK调试环境中,它没有问题。
接下来,如果我将此程序写入外部SPI Flash并让它运行独立,它将停止工作。(它不会返回。)
查看当前值,看起来DA14585已恢复。但是,与外部微电脑的SPI通信似乎不得进行。
调试环境(KEIL - UVISION和J - LINK)和真实环境(使用FLASH)之间的操作是否存在差异?
(例如,在调试环境中,RAM的电源实际上并未关闭。)
(2)正在进行的蓝牙通信
如果我在蓝牙通信期间以相同的方式使用端口中断进行返回操作,
The function lld_sleep_compensate_func (in rwble.c) is called,
Then it stops with ASSERT_WARNING (0) on the last line.
这种现象发生在调试环境(UVISION和J-LINK)和真实环境(使用FLASH)中。
是吗that the period of sleep has been too short? Or do you have something to think about?
Could you please advise me for workaround.
除上述信息外,如果需要,请向我们申请。
regards,
Jun-Ichi.
Hi Jun-ichi Tobe,
如果我能明白你想accomplish in your project is to wake the DA14585 up using an external MPU interrupt? Could you please clarify what you are trying to? Also, could you please make clear what do you mean with “return” that you mentioned in your first question? Do you mean wake the device up? Did I understand correctly? And your problem is that you are not able to wake up the DA14585? If you follow the DEVELOPMENT_DEBUG definition you will be able to see that there are not any differences between he debugging environment (Keil - uVision and J - LINK) and the real environment and the RAM is powered off. Regarding your second question, be aware that if this assertion hits then the LP ISR lasts longer than the time that has been reserved via LP_ISR_TIME_XTAL32_CYCLES and LP_ISR_TIME_USEC. Could you please let me know if you have any transactions of the SPI into the periph_init() function and they takes too long?
谢谢,PM_DIALOG.
感谢您的评论。
About Q1
我想要完成的是使用外部MCU和外部中断异步唤醒[扩展睡眠] DA 14585。
(a)在Keil的调试模式下,DA14585可以从睡眠中唤醒。
(b) On the other hand, if FW is written to the external SPI flash memory of DA 14585, it has failed to wake up DA 14585 from the sleep state.
What are the differences in operation between (a) and (b)?
如何在环境中正确地工作(B)?
或者,如何在环境(a)和(b)中验证RAM是否打开或关闭?
Regards,
Jun-Ichi.
Hi Jun-ichi,
嗯,如果585能够从闪光灯正确启动,那么它不应在从闪存中运行代码之间的任何区别,或者在关于唤醒过程的调试时之间的任何区别。如果设备在从闪存启动时醒来可能会检查设备是否实际启动(您是否宣传设备启动时?您有吗?
设备启动的任何指示?)。我也想你也在使用睡眠,所以你正在使用什么样的睡眠?你试图从闪光灯引导,没有睡觉吗?是吗
operational that way ? Also when booted from flash (while sleep) you should be able to attach on the device in order to check if the device is stuck on an assertion or a hardfault.
您也可以尝试的是刻录闪存中的BLE_APP_SLEEPMODE(它有类似的功能,我认为自己的函数,它会睡觉并从外部中断唤醒)。所以尝试唤醒SDK的示例,同时在闪光灯中燃烧并检查它是否在您身边。
Thanks MT_Dialog
你好!
>>I suppose also that you are using sleep, so what kind of sleep you are using ?
-->I have used "Extended Sleep" mode.
如果使用延长睡眠,则根据调试环境是否存在RAM状态差异?
regards,
Jun-Ichi.
你好!
关于问题2:
During the process of wake up from sleep, SPI communication was included
当你指出时,我发现花了太久了!
通过校正相应的部分来解决。
Thank you!
Jun-Ichi.
你好 !
我报告了关于Q1的测试环境(在exteded睡眠期间)
Base sample project: ble_app_peripheral
SPI processing: Implemented in "spi_hcl.c"
我会描述这个程序。
[Host MPU (SPI Master) → DA 14585 (Slave)]
1)使用端口中断唤醒DA 14585。
2) Call the function arch_set_sleep_mode (ARCH_SLEEP_OFF) to wake up.
3) After DA 14585 communication, set the port interrupt and call the function arch_set_sleep_mode (ARCH_EXT_SLEEP_OTP_COPY_ON)
and set it to Extended Sleep.
[从DA14585(从机)的SPI传输到主机MPU(SPI Master)]
When DA14585 performs Bluetooth communication, it outputs a DREADY signal and performs SPI communication.
At that time, DA14585 does not change the sleep setting.
结果(电流测量)
[When project is written to SPI flash and executed]
调用ARCH_SET_SLEEP_MODE(ARCH_SLEEP_OFF)时;在端口中断,
几秒钟内,电流消耗从大约400 UA到600 UA增加,DA 14585将不接受来自主机MPU的SPI通信。
When sending the advertise start command while consuming current is 400 uA, advertisement is started.
If I call wdg_freeze () after calling ARCH_SLEEP_OFF, it seems that current will not increase for the moment.
Because it becomes abnormal in a couple of seconds, I thought that the watchdog timer was working.
我认为,WDG_FREEZE函数似乎有效。
This is only when I wrote the FW to SPI Flash.
[与Keil的调试器一起运行]
端口中断后,已接受SPI命令。
After that DA14585 can also execute Bluetooth communication.
Where are the differences depending on the execution environment? Memory setting? Build setting?
regards,
Jun-Ichi.
Hi Jun-ichi Tobe,
Could you please try to describe more clearly what you are trying to accomplish and which is your issue? Sorry, but I am not able to understand which is your problem. Regarding the Q1, as you have already mentioned in your previous post, you figured your issue out. Is that correct? Now what you are trying to do? You boot from the SPI flash and you are using the external MCU in order to send commands into the DA14585? Regarding the current consumption, the problem is when booing from SPI flash? Have I understood correctly?
谢谢,PM_DIALOG.