在I2C传输过程中丢失BLE连接。

⚠️
嗨,...感谢您来论坛。令人兴奋的消息!我们现在正在迁至我们的新论坛平台,将提供更好的功能,并包含在主对话框网站中。所有帖子和帐户都已迁移。我们现在只接受新论坛上的流量 - 请发布任何新线程https://www.dialog-seminile.com/support.。我们将在未来几天修复错误/优化搜索和标记。
12个帖子/ 0新
最后一篇
尼格利
离线
最后一次露面:2个月2天前
加入:2018-03-20 08:24.
在I2C传输过程中丢失BLE连接。

嗨对话框,

我的任务之一是负责发送/发射ing massive data to external chip via I2C. I often enounter the problem that DA14681 sends wrong I2C signal( re-launch start condition ) and losing BLE connection within couple seconds. I found as long as I increase connection interval, the rate of this problem happening is decreasing. Furthermore, the result is better after I added many slave latency. I guess BLE TX/RX event of every interval might take place during I2C transmission. please take a look at the attached PDF file for understanding what I mean. Is the problem possible ? if yes, how to prevent from BLE TX/RX event and I2C trnasmission happen at the same time? Is it possible to know when BLE TX/RX event happens in advance, then do I2C transmission in following step?

谢谢你的帮助。

设备:
PM_DIALOG.
离线
最后一次露面:1 day 13 hours ago
职员
加入:2018-02-08 11:03
嗨nigelyang,

嗨nigelyang,

让我检查一下,我会告诉你。

谢谢,PM_DIALOG.

尼格利
离线
最后一次露面:2个月2天前
加入:2018-03-20 08:24.
嗨对话框,

嗨对话框,

我的问题有没有解决方案?感谢您的帮助

PM_DIALOG.
离线
最后一次露面:1 day 13 hours ago
职员
加入:2018-02-08 11:03
嗨nigelyang,

嗨nigelyang,

My apologies for the delay. So, if I understood correctly your description, the problem exists as soon as a I2C transaction is happening at the same time with a BLE event. Is this correct?

该应用程序是否在对等设备中的通知中发送I2C值?发生此问题时,设备是否重新启动或它只是断开连接?你运行它调试模式了吗?此外,您还在使用任何睡眠模式吗?

我假设优先级比I2C更高的事件可能是它在ISR中提供。提供比I2C(Priority_2)更优先级(Priority_1)的BLE中断。

谢谢,PM_DIALOG.

尼格利
离线
最后一次露面:2个月2天前
加入:2018-03-20 08:24.
嗨对话框,

嗨对话框,

是的,我的问题是BLE事件(ACK)和I2C传输(尤其是读数)同时进行。

它似乎重启或i2c返回0x8001失败(我使用i2c适配器,e.g ad_i2c_read();)。我观察到I2C信号传输分为两个(似乎重新启动的启动条件,因为DA14681无法在字节完成时给出ACK)

I got same result via two modes, debug mode and production. Should the results be different? I used "pm_mode_idle" when the problem happened. You mentioned that The BLE interrupt is served with higher priority (PRIORITY_1) than the I2C (PRIORITY_2). I think so, the BLE event (resposne ACK) leads to the irregular I2C transmission, and let DA14681 go to unknow state ( reboot later) or still waiting for external data all the way.

我打算知道哪些任务或职能负责在每个连接间隔中发送BLE ACK,并允许我在以下步骤中执行I2C电视。

PM_DIALOG.
离线
最后一次露面:1 day 13 hours ago
职员
加入:2018-02-08 11:03
嗨nigelyang,

嗨nigelyang,

What is the behavior in debug mode? Does the code get stuck? For example, are you getting any assertion or anything else.. This is happening only when the DA1468x is connected with a peer device?

谢谢,PM_DIALOG.

尼格利
离线
最后一次露面:2个月2天前
加入:2018-03-20 08:24.
嗨对话框,

嗨对话框,

Generally, tuck by I2C transmission. I do not use assertion. I use mobile App TX/RX data to DA14681, and process the data, then TX/RX data with external chip via I2C.

I hope I could exactly know when the BLE event (acknowledge) happens, allow me to do I2C transmission between two connection events. Is it possible to know the interrupt of BLE connection event ? if yes, how to know?

一个问题,如果da14681启动了更改连接速率参数的请求,它将完成并调整新的连接速率参数? one connection interval or longer ?

谢谢你的帮助。

奈杰尔

PM_DIALOG.
离线
最后一次露面:1 day 13 hours ago
职员
加入:2018-02-08 11:03
嗨nigelyang,

嗨nigelyang,

很抱歉,我答复晚了。所以,如果我正确地理解,你想在每个连接间隔中触发应用程序,这是您的要求吗?

关于您的第二个问题,您是否意味着连接更新参数程序?通常,连接间隔由中央定义,因此您可以做的是发出连接更新请求,并且中央将决定它是否会接受所请求的连接参数。一旦主人接受了更新参数请求,您是否意味着它会花费多少?

谢谢,PM_DIALOG.

尼格利
离线
最后一次露面:2个月2天前
加入:2018-03-20 08:24.
嗨对话框,

嗨对话框,

是的,我想在连接事件之间执行i2c转换。请教我该怎么办?

感谢您的帮助

奈杰尔

PM_DIALOG.
离线
最后一次露面:1 day 13 hours ago
职员
加入:2018-02-08 11:03
嗨尼格尔,

嗨尼格尔,

是的,但是在睡眠模式下配置的设备?通常,系统可以进入睡眠模式BTWEEEN广告或连接间隔。

谢谢,PM_DIALOG.

尼格利
离线
最后一次露面:2个月2天前
加入:2018-03-20 08:24.
嗨对话框

嗨对话框

负责发送BLE确认的代码(或函数)在哪里?我想知道时间执行代码,允许我在发送确认之后立即执行i2c传输,以确保在下一个ACK之前完成完成I2C作业。谢谢

PM_DIALOG.
离线
最后一次露面:1 day 13 hours ago
职员
加入:2018-02-08 11:03
嗨尼格尔,

嗨尼格尔,

请看看7.7节BLE中断生成UM-B-044:DA1468X软件平台参考用户指南。请检查以下子弹:

ble_event_irq:广告/扫描/连接事件的结尾。用于清理/重新初始化状态和推迟TX / RX处理操作。

在此之后,请参见第8.3.4节挂钩UM-B-056:DA1468X软件开发人员指南文档。BLE挂钩机制提供了用户应用程序,该方法是关于特定BLE事件的确切发生时间的通知方式。请参见图41:连接。

谢谢,PM_DIALOG.