嗨对话框,
我目前正在研究一个使用DA 14580的项目。我的系统的目标简单:我通过SPI链接发送数据(20个八位字节的数据包)到DA14580。然后我使用信标模式发送此数据(将数据从广告字符串中的SPI放置),我可以通过移动电话的蓝牙扫描仪接收所有数据。我在IAR上为全局代码(从传感器收集数据并将其发送到SPI Flash链接),我通过SPI在代码的开头加载了蓝牙配置的二进制文件。当我在UVION上构建我的蓝牙程序时,将创建二进制文件(我使用对对象模式的对话框半导体提供基本程序)。雷竞技电竞平台
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
嗨佛罗伦特,
这似乎是睡眠模式问题。作为一个实验,要么确认或统治它,请在您的DA14580固件中禁用睡眠,让我知道这是否有效。
另外,请告诉我以下内容:
/MHv
嗨对话框,
在一些测试之后,我看到这个问题有点不同。实际上,我只是只发送一个数据(每次发送一个+我只通过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
嗨佛罗伦特,
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:
Let me know if any of this helps.
/MHv
嗨对话框,
因此,如果我理解嗯,可以在调试中转到睡眠模式。看起来很奇怪,因为我在调试时,我在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
嗨佛罗伦特,
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
嗨对话框,
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