Customizing DA1458x_DSPS_v_5.150.2 for DA14580

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support。We’ll be fixing bugs / optimising the searching and tagging over the coming days.
14个帖子/ 0新
Last post
shpasser
Offline
Last seen:8 months 2 weeks ago
Joined:2018-11-02 09:31
Customizing DA1458x_DSPS_v_5.150.2 for DA14580

I'm trying to implement a "heartbeat" feature for DSPS 5.150.2 on DA14580.

The idea is to have a special message which my host application would send to DSPS via the UART and get
来自DSP(也通过UART)的响应而不通过BLE发送数据。

1.What would be the right approach to implement such a feature?
2. Which code / functions should I customize in order to implement "heartbeat"?

任何帮助将不胜感激。

设备:
PM_Dialog
Offline
Last seen:6天58分钟前
Staff
Joined:2018-02-08 11:03
嗨Showserer,

嗨Showserer,

您能否澄清你的意思,以“心跳”特征以及你想要完成的东西?您是否意味着要添加到DSP参考应用程序代码中的心率曲线?

Thanks, PM_Dialog

shpasser
Offline
Last seen:8 months 2 weeks ago
Joined:2018-11-02 09:31
Hello,

Hello,

The "heartbeat" feature is a mechanism (actually a simple message exchange) used in order to make sure the node,
which in my case is the firmware running on DA14580, is "alive". In case it is not "alive" the host software shall issue
DA14580通过UART重置和重新编程它(DSP设备以后使用的相同UART)。

Most of the time DSPS works fine, but sometimes it crashes and then I would need to know that the crash occurred
并重置和重新编程DA14580芯片。

提前致谢。

PM_Dialog
Offline
Last seen:6天58分钟前
Staff
Joined:2018-02-08 11:03
嗨Showserer,

嗨Showserer,

感谢你的信息。您可以使用调试器热连接在调试模式下运行DSP固件吗?代码是否崩溃了?请尽量澄清发生了什么。可能,你得到了一个nmi或硬盘。此外,您提到有时固件崩溃。你能澄清一下吗?

Thanks, PM_Dialog

shpasser
Offline
Last seen:8 months 2 weeks ago
Joined:2018-11-02 09:31
Hello Dear Support,

Hello Dear Support,

The DSPS crashes I experienced are very rare and I was not able to reproduce them while running with the debugger attached.
我正在努力的系统始终是可连接的,这就是我需要实现“心跳”功能的原因。

由于我必须通过UART编程DA14580,因此简单的“重启 - on-Fault”不会完成作业。

提前致谢。

PM_Dialog
Offline
Last seen:6天58分钟前
Staff
Joined:2018-02-08 11:03
嗨Showserer,

嗨Showserer,

Since that you have modified the DSPS project, I am not aware what you have added into the application code. Be aware that the DSPS is a reference design for very specific applications. You mentioned that “The system I'm working on shall be connectable at all times ” , could you please clarify it? Do you mean that you would like to advertise and be connectable when the device is connected with one other peer DSPS device? Could you please provide me more inputs about what you have done?

Thanks, PM_Dialog

shpasser
Offline
Last seen:8 months 2 weeks ago
Joined:2018-11-02 09:31
Hello again,

Hello again,

我还没有使用DSP的修改版本。因此,崩溃实际上与DSPS代码本身相连。

即使DSP应用程序崩溃我的主机应用程序也应该能够知道,即使DSPS应用程序崩溃了
that the crash happened in order to reset the DA14580 and reprogram it via the UART.

So now we are back to my original question, what would be the right way to change the DSPS code in order
实施“始终可连接”?

提前致谢。

PM_Dialog
Offline
Last seen:6天58分钟前
Staff
Joined:2018-02-08 11:03
嗨Showserer,

嗨Showserer,

You have to debug the code and find where the DSPS gets crashed. If you run it with the debugger attached and if the problem if from the host’s side, the firmware should stack somewhere. For example might stuck into an assertion or into the NMI handler or into the hardfault handler. Which call back functions are triggered before the code gets crashed? You could add some break points and debug it step by step. The best practice to debug your code is to have optimization Level-0 (-O0). So, navigate into “C/C++” tab of “Options for Target” from the Keil environment and the optimization into Level-0 (-O0).

Thanks, PM_Dialog

shpasser
Offline
Last seen:8 months 2 weeks ago
Joined:2018-11-02 09:31
Hello Dear Support,

Hello Dear Support,

谢谢你的彻底解释。我已经尝试多次调试DSP,并在之前描述的,
the crashes are very rare (but still they exist) and I was not able to pinpoint the issue using the debugger.

它可能需要一天,直到出现问题,而我有几个系统工作的调试方法是最好的,
but not practical in my situation.

So, I’ve decided to try and change the DSPS code in order to be able to communicate with DSPS in Out Of Band manner in order to be
能够通过UART重置和重新编程芯片,当它无响应时。

您能否在DSPS代码之上向我提供有关实现此类功能的最佳/正确方法的信息。

提前致谢。

PM_Dialog
Offline
Last seen:6天58分钟前
Staff
Joined:2018-02-08 11:03
嗨Showserer,

嗨Showserer,

您能否描述你关注的程序?对不起,但我很困惑你的描述,你的问题非常通用。让我问你一些问题,以便清除这些问题。

  • Are you using the default DSPS project, as it is in our support portal ore you have done any modifications in the application code?
  • 您有定制董事会或我们的任何开发板吗?
  • The host(sps_host) is a DA1480, but what about the device (sps_device) side?
  • 你能澄清这个问题吗?“为了能够通过UART重置和重新编程芯片,当它变得无响应时”
  • 如果您已安装调试器,则主机侧或设备侧的固件必须粘在某个地方。
  • The DA14580 is at the connected or adverting stated?
  • 在上一个注释中,您解释了“心跳”功能,这是一个简单的消息交换。我需要一些额外的澄清。您想向UART或其他DSP设备发送消息吗?

由于您的问题非常通用,罕见,为我提供一些投入是非常有帮助的,以便理解出错了。

Thanks, PM_Dialog

shpasser
Offline
Last seen:8 months 2 weeks ago
Joined:2018-11-02 09:31
Hello Dear Support,

Hello Dear Support,

感谢您的回复。

1.我使用“sps_device”只有在色差上运行ta module.
2.“主机”应用程序在STM32L4上运行,并通过UART编程Murata(使用DSP设备代码),并通过相同的UART与其通信。
3.有一个“客户端”应用程序,它在iPad上运行,它通过Murata模块(DSP设备)与STM32L4上运行的“主机”应用程序通信。
4.“SPS_DEVICE”配置为在没有HW(不支持的)或SW(不适用)流量控制的情况下工作。
5.有时,非常罕见(也许每天一次)在Murata模块上运行的“SPS_DEVICE”可能是由于您描述的原因之一(断言或某种崩溃)之一。
6.当(5)发生时,我可以通过其他UART(未连接到Murata模块)连接到STM32L4上运行的“主机”应用程序,并看到它仍在运行,但通过BLE发送的消息已停止到达(在两个方向上)。
7. I was not able to reproduce the issue while connected with a debugger to Murata module.
8.为了准备一个解决方法解决方案,我决定在STM32L4上运行的“主机”应用程序和“SPS_DEVICE”在MURATA模块上运行的“带外”通信(“心跳”),所以我可以重新编程Murata模块变得无响应。
9. The only communication my "host" application has with Murata is via the UART (which is also used to program "sps_device").
10.请就可能的代码自定义或源文件提供建议,以便更改以实现所描述的解决方法。

提前致谢。

shpasser
Offline
Last seen:8 months 2 weeks ago
Joined:2018-11-02 09:31
Hello Dear Support,

Hello Dear Support,

你有什么建议吗?

提前致谢。

PM_Dialog
Offline
Last seen:6天58分钟前
Staff
Joined:2018-02-08 11:03
嗨Showserer,

嗨Showserer,

First of all, if you are not using flow control and the device goes int extended sleep mode, it will no be able to wake up. So, if you would like to don’t have flow control, you will have to remove the extended sleep mode and the chip will be operating only in active mode. Regarding the workaround that you will have described, we have never used it and thanks for let us know. If I am able to understand correctly, the host has to send some messages over UART to the Murata module? Which application does the host run? I suppose that the DSPS mobile application I connected with the Murata module and not with the STM32L4.

Thanks, PM_DIalog

shpasser
Offline
Last seen:8 months 2 weeks ago
Joined:2018-11-02 09:31
Hello Dear Support,

Hello Dear Support,

1.In order to avoid sleeping I replaced

const static sleep_state_t app_default_sleep_mode = arch_sleep_on;

const static sleep_state_t app_default_sleep_mode = arch_sleep_off;

inuser_config.h., is this correct?

2. The communication path is as follows: STM32L4(Host) -> UART -> Murata(DSPS) -> BLE -> iPad(BLE App)

3.等待有关可能的代码自定义或源文件的重新组件,以便实现解决方法。

提前致谢。