⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程https://www.dialog-seminile.com/support.。我们将在未来几天修复错误/优化搜索和标记。
8 posts / 0 new
最后一篇
佛罗伦特
离线
最后一次露面:3 years 6 months ago
加入:2017-08-08 11:42
DA 14580 Debug Mode to Autonomous

嗨对话框,

我目前正在研究一个使用DA 14580的项目。我的系统的目标简单:我通过SPI链接发送数据(20个八位字节的数据包)到DA14580。然后我使用信标模式发送此数据(将数据从广告字符串中的SPI放置),我可以通过移动电话的蓝牙扫描仪接收所有数据。我在IAR上为全局代码(从传感器收集数据并将其发送到SPI Flash链接),我通过SPI在代码的开头加载了蓝牙配置的二进制文件。当我在UVION上构建我的蓝牙程序时,将创建二进制文件(我使用对对象模式的对话框半导体提供基本程序)。yabo国际娱乐

My problem is that the system works correctly in debug mode. So when I launch the system with IAR, the BLE module boot correctly and send the data correctly. But when I try to do it without the debug mode, it doesn't work. I reset the system, so the code starts running from the beginning, but the BLE module doesn't send any data.

系统这样工作:
微控制器醒来,并初始化BLE module. When the micro controller is ready to send a data, it send a wake up signal to the BLE module, which start his configuration. Then the micro controller send the data to the BLE module through the SPI flash. Then the BLE module send the data by beacon mode, and go to sleep when it is finish.

那么我想知道的是调试模式和自主模式之间的区别是什么?
Any idea to solve this let me know.

Best regards,
Florent

Keywords:
Device:
mhv_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2013-12-06 15:10
嗨佛罗伦特,

嗨佛罗伦特,

这似乎是睡眠模式问题。作为一个实验,要么确认或统治它,请在您的DA14580固件中禁用睡眠,让我知道这是否有效。

另外,请告诉我以下内容:

  1. What type of sleep mode are you using (Deep sleep or extended sleep)?
  2. 当你说“调试模式”......你的意思是与J-Link附加?
  3. Your wake-up mechanism - is it using the wake-up timer? (a "normal" gpio interrupt will not work during sleep)
  4. You use the phrase "SPI flash" in your description. Can I assume that you meant to say SPI interface and that there is no flash involved?

/MHv

佛罗伦特
离线
最后一次露面:3 years 6 months ago
加入:2017-08-08 11:42
嗨对话框,

嗨对话框,

在一些测试之后,我看到这个问题有点不同。实际上,我只是只发送一个数据(每次发送一个+我只通过BLE扫描仪收到第一个数据),然后将BLE模块似乎卡住了一个数据。

我使用延长睡眠。
2.是,调试模式是当我使用IAR使用J-Link模块运行代码时。
3. My wake up mechanism is an external wake up, the micro controller that I use send a signal (SYS_WAKEUP) when I want to send a packet, and there is an interruption on the BLE module when it receive the signal from the micro controller. But with this device, it works perfectly in "debug", and it seems to work at least one time without the "debug" mode.
4. Yes I wanted to say the SPI interface sorry.

Regards,
Florent

mhv_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2013-12-06 15:10
嗨佛罗伦特,

嗨佛罗伦特,

When you are using the debugger, you are really never going to sleep (real sleep mode turns off the controller in the DA14580, so it would not be possible to debug when sleep is enabled). When you run the code autonomously, as you say, the device will remain awake for 2 seconds after code starts executing which is why you will see one or two advertisements before the device goes to sleep.

Two things are required for your implementation to work with extended sleep mode:

  1. 您必须有一个定义匹配硬件的睡眠时钟。如果您有外部32k768Hz水晶,那么这应该立即使用。如果您没有外部水晶,则必须将CFG_LP_CLK定义为LP_CLK_RCX20在文件DA1458x_config_Advanced.h(第28行)中
  2. During sleep, a normal GPIO interrupt will not trigger a wake-up. You will have to use the wake-up timer (see the UM-B-051 section 10.7 for details)

Let me know if any of this helps.

/MHv

佛罗伦特
离线
最后一次露面:3 years 6 months ago
加入:2017-08-08 11:42
嗨对话框,

嗨对话框,

因此,如果我理解嗯,可以在调试中转到睡眠模式。看起来很奇怪,因为我在调试时,我在U-Processor上运行代码,在输入链接器中有一个二进制文件(在IAR上)。所以我没有真正运行/调试BLE模块,我只是加载这个二进制文件,只在我的程序开始时只使用一次,以通过SPI初始化BLE模块。

因此,如果睡眠模式在调试中不起作用,当我摇动电路板时,我如何在智能手机BLE扫描仪上接收值(我有一个加速度计,它在检测到振动时发送信号,并且然后我发送一些数据,这个GPIO信号在调试模式下用中断唤醒BLE模块?

Moreover, you tell me to use the the wake-up timer, so it means that I can really control when I send data with my u-processor, cause the shake will not be efficient, cause of the gpio signal ?

Thanks for your help,
Best regards,
Florent

mhv_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2013-12-06 15:10
嗨佛罗伦特,

嗨佛罗伦特,

Let's step back a bit :-)

Please explain in detail what you mean by debug mode. Are you, or are you not, using the serial-wire debugger on the DA14580 (J-Link), and, if so, is the debugger attached?

您可以在睡眠模式下使用调试器,但设备实际上不会睡眠状态(因为这会将调试器除以控制器电源关闭)。

In order to use sleep mode without the debugger attached, you will need to configure your sleep clock to match your hardware as described above. Otherwise the device will not wake up from sleep.

The wake-up timer is actually a hardware block on the device that allows you to wake the controller up from sleep mode when a input GPIO changes state. Please see the reference manual for details (UM-B-051). This will allow you to wake up the DA14580 as soon as your accelerometer toggles its interrupt output pin/pins.

/MHv

佛罗伦特
离线
最后一次露面:3 years 6 months ago
加入:2017-08-08 11:42
嗨对话框,

嗨对话框,

By debug mode I mean : I use a SWD on my micro-processor (ADUCM3029), and this microprocessor just send some data to the BLE module through the SPI link. This microprocessor also have as input a binary file which is the configuration of the BLE module, and send this configuration at the very beginning of the code. So no, the DA14580 is not attached to the J-link module, I just used the SWD on the microprocessor to send step by step the packet to the BLE module.

因此,每次我都想测试我的一个BLE代码,我在U-Vision上编译了BLE代码,它创建了一个二进制文件,然后我通过ADUCM3029的代码链接了这一点,然后我调试ADUCM3029用SWD。

所以问题是,当我没有将J-Link模块连接到微处理器的其余部分时,DA14580只发送一个数据,然后再睡觉一次(我用LED调试它)。

So the external wake up is working, but only once.
Thanks,
Florent

mhv_dialog.
离线
最后一次露面:2个月1周前
职员
加入:2013-12-06 15:10
嗨佛罗伦特,

嗨佛罗伦特,

谢谢你的详细解释。

这是要调查的东西列表:

  1. 您的唤醒方案必须利用唤醒定时器硬件块,以便从睡眠中唤醒设备。标准的GPIO中断将不起作用,除非它发生在DA14580唤醒时(启动后2秒钟仍然令人醒着,并将唤醒任何蓝牙事件,这可能解释了它为什么运转一次)。有关详细信息,请参阅UM-B-051第10.7节。
  2. 从睡眠中醒来需要一些时间,你应该实现某种握手或固定延迟,以确保在开始发送数据之前完全初始化DA14580上的SPI接口。
  3. 当主处理器附加到调试器时,我无法解释为什么您的观察结果不同,但这可以指示上面的子弹2的时间问题和潜在的空位

/MHv