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 days 1 hour ago
Staff
Joined:2018-02-08 11:03
嗨,希帕瑟,

嗨,希帕瑟,

你能澄清一下你的“心跳”功能是什么意思,以及你想要完成什么吗?您的意思是要添加到DSPS参考应用程序代码中的心率配置文件吗?

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(相同的UART稍后使用的DSP设备)。

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 days 1 hour ago
Staff
Joined:2018-02-08 11:03
嗨,希帕瑟,

嗨,希帕瑟,

谢谢你的信息。您能在调试模式下运行DSPS固件并热连接调试器吗?代码在什么地方崩溃了吗?请澄清发生了什么事。可能,你得到了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进行编程,一个简单的“故障重启”就不能完成这项工作。

提前谢谢。

PM_Dialog
Offline
Last seen:6 days 1 hour ago
Staff
Joined:2018-02-08 11:03
嗨,希帕瑟,

嗨,希帕瑟,

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代码本身有关。

“随时可连接”对我来说就是即使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 days 1 hour ago
Staff
Joined:2018-02-08 11:03
嗨,希帕瑟,

嗨,希帕瑟,

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重置和重新编程。

Could you please assist me with information on the best/right way of implementing of such a feature on top of DSPS code.

提前谢谢。

PM_Dialog
Offline
Last seen:6 days 1 hour ago
Staff
Joined:2018-02-08 11:03
嗨,希帕瑟,

嗨,希帕瑟,

你能描述一下你所遵循的程序吗?很抱歉,但我对你的描述有点困惑,你的问题很笼统。让我问你几个问题以便把事情弄清楚。

  • 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?
  • 在前面的评论中,您解释了“heartbeat”特性,这是一个简单的消息交换。我需要一些额外的澄清。您想将消息发送到UART还是其他DSPS设备?

由于你的问题是相当普遍和罕见的,它将是非常有帮助的,为我提供一些投入,以了解什么是错的。

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与Murata进行通信。
三。有一个运行在iPad上的“客户端”应用程序,它通过Murata模块(DSPS设备)与运行在STM32L4上的“主机”应用程序通信。
4“sps\ U设备”配置为在没有硬件(不支持)或软件(不适用)流量控制的情况下工作。
5有时,运行在Murata模块上的“sps_设备”很少(可能一天一次)无法连接,可能是由于您描述的原因之一(断言或某种崩溃)。
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上的“主机”应用程序和运行在Murata模块上的“sps\u设备”之间实现“带外”通信(“heartbeat”),以便在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 days 1 hour ago
Staff
Joined:2018-02-08 11:03
嗨,希帕瑟,

嗨,希帕瑟,

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\u state\u t app\u default\u sleep\u mode=ARCH\u sleep\u ON;

具有

const static sleep\u state\u t app\u default\u sleep\u mode=ARCH\u sleep\u OFF;

in用户配置.h, is this correct?

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

三。等待您关于可能的代码自定义或源文件的建议更改,以便实现解决方案。

提前谢谢。