Hello support,
我正在考虑使用外部中断input of DA 14585 to asynchronously return (from exteded sleep) using external MPU.
我指的是文档(Training\u 04\u Sleep mode configurations and power measurement\u 0.pdf)(第9页)
SDK:6.0.8.509。
The external MPU and DA 14585 are connected using SPI I/F.
我有两个问题。
Q1. During exteded sleep
Behavior is different between Keil-uVision debugging operation and actual operation.
First I set to "exteded sleep" when DA 14585 is not communicating, and set action from restore DA 14585 from Sleep state by using port interrupt.
I would like to communicate with SPI immediately after returning. ,
In uVision and J-LINK debugging environment, it works without problems.
Next, if I write this program to the external SPI flash and let it operate standalone, it will stop working. (It will not return.)
Looking at the current value, it looks like DA14585 has recovered. However, SPI communication with external microcomputer seems not to be done.
Are there any differences in the operation between the debugging environment (Keil - uVision and J - LINK) and the real environment (using flash)?
(For example, in the debugging environment, the power supply of the RAM is not actually turned off.)
(2) Bluetooth communication in progress
If I do a return operation using port interrupts in the same way during Bluetooth communication,
调用函数lld\u sleep\u compensate\u func(在rwble.c中),
然后它在最后一行以ASSERT\u警告(0)停止。
This phenomenon occurs in both the debugging environment (uVision and J-LINK) and the real environment (using flash).
是不是睡眠时间太短了?或者你有什么要考虑的?
你能告诉我解决办法吗。
In addition to the above information, if necessary items, please request to us.
当做,
Jun-ichi
嗨,Tobe君一,
如果我能理解你想在你的项目中完成什么是唤醒DA14585使用外部微处理器中断?你能澄清一下你想说什么吗?另外,请您说明一下您在第一个问题中提到的“退货”是什么意思?你的意思是唤醒设备?我理解对了吗?你的问题是你不能唤醒DA14585?如果您遵循DEVELOPMENT\u DEBUG定义,您将能够看到调试环境(Keil-uVision和J-LINK)与实际环境之间没有任何区别,并且RAM已关闭。关于第二个问题,请注意,如果此断言命中,则LP ISR持续的时间将长于通过LP\u ISR\u time\u XTAL32\u CYCLES和LP\u ISR\u time\u USEC保留的时间。如果您有任何SPI事务进入periph\u init()函数并且它们花费的时间太长,请告诉我好吗?
Thanks, PM_Dialog
Thank you for your comment.
关于Q1
What I want to accomplish is to asynchronously wake sleeping[Extended sleep] DA 14585 using external MCU and external interrupt.
(a) In Keil's debug mode, DA14585 could wake up from sleep.
(b) 另一方面,如果FW写入DA14585的外部SPI闪存,则无法将DA14585从睡眠状态唤醒。
(a)和(b)在操作上有什么区别?
How can I make it work correctly in environment (b)?
Or, how can I verify whether RAM is on or off in the environments (a) and (b)?
当做,
Jun-ichi
嗨,一君,
Well, if the 585 is able to boot properly from flash then it shouldn't have any difference between running the code from the flash or when debugging regarding the wake up procedure. If the device doesn't wake up when you are booting from flash perhaps you should check if the device is actually booting (do you advertise when the device boots up ? do you have
any indication that the device has booted ?). I suppose also that you are using sleep, so what kind of sleep you are using ? Have you tried to boot from flash with no sleep used ? Is it
那样运作?另外,当从flash启动时(睡眠时),您应该能够连接到设备上,以检查设备是否卡在断言或硬故障上。
What you can also try is to burn the ble_app_sleepmode in flash (it has a similar functionallity to what i suppose that you do, it goes to sleep and wakes up from an external interrupt). So try to wake the example of the SDK while burned in flash and check if its working on your side.
谢谢你的对话
Hi!
>>我想你也在使用睡眠,那么你在使用什么样的睡眠呢?
-->我使用了“延长睡眠”模式。
If Extended Sleep is used, are there any differences in RAM status depending on the debugging environment?
当做,
Jun-ichi
Hi!
About Question 2:
在从睡眠中醒来的过程中,包括SPI通信
and as you indicated, I found that it took too long !
It was solved by correcting the corresponding part.
谢谢您!
Jun-ichi
Hello !
I report the test environment about Q1( During exteded sleep)
基本示例项目:ble\u app\u peripheral
SPI处理:在“SPI\u hcl.c”中实现
I will describe the procedure.
[主机MPU(SPI主机)→ DA 14585(从属)]
1) Wake up DA 14585 using port interrupt.
2) 调用函数arch\u set\u sleep\u mode(arch\u sleep\u OFF)唤醒。
3) 在DA 14585通信后,设置端口中断并调用函数arch\u set\u sleep\u mode(arch\u EXT\u sleep\u OTP\u COPY\u ON)
把它设为长时间睡眠。
[SPI transmission from DA14585 (slave) to host MPU (SPI master)]
当DA14585执行蓝牙通信时,它输出可怕的信号并执行SPI通信。
此时,DA14585不会更改睡眠设置。
Result (current measurement)
[当项目写入SPI flash并执行时]
When calling arch_set_sleep_mode (ARCH_SLEEP_OFF); in the port interrupt,
the current consumption increases from about 400 uA to 600 uA in a few seconds and the DA 14585 will NOT accept SPI communication from the host MPU.
在消耗电流为400 uA时发送播发启动命令时,播发启动。
如果我在关闭ARCH\u SLEEP\u之后调用wdg\u freeze(),电流似乎暂时不会增加。
因为几秒钟后就不正常了,我以为看门狗定时器在工作。
The wdg_freeze function seems to be effective,I think.
这只是当我写的FW到SPI闪存。
[Run with Keil's debugger]
After port interrupt, SPI command is accepted.
之后,DA14585还可以执行蓝牙通信。
根据执行环境的不同,差异在哪里?内存设置?生成设置?
当做,
Jun-ichi
嗨,Tobe君一,
你能不能试着更清楚地描述一下你想完成什么,你的问题是什么?对不起,我不明白哪一个是你的问题。关于Q1,正如你在上一篇文章中提到的,你已经解决了你的问题。对吗?现在你想做什么?从SPI闪存引导,使用外部MCU向DA14585发送命令?关于目前的消费,问题是当嘘声从SPI闪存?我理解对了吗?
Thanks, PM_Dialog