我正在尝试为DA14580上的DSPS 5.150.2实施“心跳”功能。
这个想法是拥有一个特殊的消息,我的主机应用程序将通过UART发送到DSP并获得
a response from DSPS (also via the UART) without transmitting the data over BLE.
1.实施此类功能的正确方法是什么?
2.我应该自定义哪种代码/函数以实现“心跳”?
Any help would be greatly appreciated.
Device:
Hi shpasser,
Could you please clarify what you mean with the "heartbeat" feature and what you are trying to accomplish? Do you mean the Heart Rate profile to be added into the DSPS reference application code?
谢谢,PM_DIALOG.
你好,
“心跳”功能是使用的机制(实际上是一个简单的消息交换),以便确保节点,
在我的情况下是在DA14580上运行的固件,是“Alive”。如果它不是“活着”的主机软件将发出
DA14580's reset and reprogram it via the UART (the same UART used later by DSPS device).
大多数时间DSP工作都很好,但有时它会崩溃,然后我需要知道崩溃发生了
and reset and reprogram the DA14580 chip.
Thanks in advance.
Hi shpasser,
Thanks for your information. Could you please run the DSPS firmware in debug mode with the debugger hot-attached? Does the code crash somewhere? Please try to clarify what happened. Probably, you get an NMI or a hardfault. Also, you mentioned that sometimes the firmware crashes. Could you please clarify it?
谢谢,PM_DIALOG.
亲爱的支持,
DSP崩溃我经历过非常罕见,我无法在使用调试器附加的同时再现它们。
The system I'm working on shall be connectable at all times and that is the reason why I need to implement the "heartbeat" feature.
Since I have to program the DA14580 via the UART a simple "reboot-on-fault" would not do the job.
Thanks in advance.
Hi shpasser,
由于您已修改DSPS项目,因此我不知道您已添加到应用程序代码中的内容。请注意,DSP是非常特定应用的参考设计。雷竞技安卓下载你提到“我正在努力的系统应该在所有时间可以连接”,你能澄清吗?您是否意味着您希望在设备与其他对等DSP设备连接时进行宣传和可连接?您能否向我提供更多关于您所做的内容的投入?
谢谢,PM_DIALOG.
再次问好,
I'm not using a modified version of DSPS yet. So, the crashes are actually connected to the DSPS code itself.
"Connectable at all times" for me is even if the DSPS app crashes my host application should be able to know
崩溃发生了崩溃,以便重置DA14580并通过UART重新编程它。
所以现在我们回到了我的原始问题,是什么是改变DSPS代码的正确方法
to implement "Connectable at all times"?
Thanks in advance.
Hi shpasser,
您必须调试代码并找到DSP崩溃的位置。如果使用调试器运行它,并且如果问题来自主机侧,则固件应该堆叠某处。例如,可能会陷入断言或进入NMI处理程序或硬盘处理程序。在代码崩溃之前触发哪个调用回函数?您可以通过步骤添加一些断点并调试它。调试代码的最佳做法是具有优化级-0(-O0)。因此,从Keil环境中导航到“C / C ++”选项卡的“C / C ++”选项卡,并将优化为Level-0(-O0)。
谢谢,PM_DIALOG.
亲爱的支持,
Thanks for the thorough explanation. I already tried to debug DSPS several times and as I described before,
崩溃非常罕见(但仍然存在),我无法使用调试器查明问题。
It can take a day till the issue appears and while I have several systems working the approach of debugging is the best,
但在我的情况下并不实用。
所以,我决定尝试改变DSPS代码,以便能够与DSP通信,以便是
able to reset and reprogram the chip via the UART when it becomes unresponsive.
你能协助我的信息吗best/right way of implementing of such a feature on top of DSPS code.
Thanks in advance.
Hi shpasser,
Could you please describe the procedure you are following? I’m sorry, but I am little bit confused with your description and you issue is very generic. Let me ask you some questions in order clear the things out.
Since your issue is quite generic and rare, it would be very helpful to provide me some inputs in order to understand what getting wrong.
谢谢,PM_DIALOG.
亲爱的支持,
Thanks for your reply.
1.我只使用“sps_device”,我在Murata模块上运行。
2. The "host" application is running on STM32L4 and programs Murata (with DSPS device code) via UART and communicates with it via the same UART.
3. There is a "client" application which runs on iPad which communicates with my "host" application running on STM32L4 via Murata module (DSPS device).
4. The "sps_device" is configured to work without HW (not supported) or SW (not applicable) flow control.
5. Sometimes, very rare (maybe once a day) the "sps_device" running on Murata module becomes unconnectable probably due to one of the reasons you described (assertion or some kind of crash).
6. When (5) happens I can connect to my "host" application running on STM32L4 via additional UART (not connected to Murata module) and see that it is still functioning, but the messages sent via BLE stopped arriving (in both directions).
7.我无法在与Murata模块连接到Murata模块时重现问题。
8. In order to prepare a workaround solution I've decided to implement "out-of-band" communication ("heartbeat") between my "host" application running on STM32L4 and "sps_device" running on Murata module, so I could reprogram Murata module when it becomes unresponsive.
9.唯一的通信我的“主机”应用程序与Murata通过UART(它也用于编程“SPS_DEVICE”)。
10. Please advice on possible code customizations or source files to be changes in order to implement the described workaround.
Thanks in advance.
亲爱的支持,
Do you have any suggestions form me?
Thanks in advance.
Hi shpasser,
首先,如果您不使用流量控制并且设备延长睡眠模式,则无法唤醒。因此,如果您希望没有流量控制,则必须删除扩展睡眠模式,芯片仅在活动模式下运行。关于您将描述的解决方法,我们从未使用过它,并且谢谢您让我们知道。如果我能够正确理解,主机必须在UART到Murata模块发送一些消息?主机运行哪个应用程序?我想我与Murata模块连接而不是STM32L4的DSP移动应用程序。
谢谢,PM_DIALOG.
亲爱的支持,
1.为了避免睡觉,我更换了
const static sleep_state_t app_default_sleep_mode = ARCH_SLEEP_ON;
with
const static sleep_state_t app_default_sleep_mode = ARCH_SLEEP_OFF;
在user_config.h, 这样对吗?
2.通信路径如下:STM32L4(主机) - > UART - > Murata(DSPS) - > BLE - > iPad(BLE App)
3. Waiting for your recomendations regarding the possible code customizations or source files to be changes in order to implement the workaround.
Thanks in advance.