雷竞技电竞平台对话半导体客户支持- ad_i2c https://support.dialog-semiconductor.com/resource-keywords/adi2c 发送和接收不能与UART1一起工作 https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/sending-and-receiving-wont-work-uart1 < div class = "字段field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >论坛:,< / div > < div class = "字段条目" > < div class =”field-item甚至“rel = " sioc: has_container " > < a href = " /论坛/ dialog-smartbond-bluetooth-low-energy - % E2 % 80% 93 -软件”“=“sioc:容器sioc:论坛”属性= " rdfs: label skos: prefLabel”数据类型= " " >对话框Smartbond蓝牙低能量-软件< / > < / div > < / div > < / div > < div class =”字段field-name-body field-type-text-with-summary field-label-hidden”> < div class = "字段条目" > < div class =”field-item甚至“财产=“内容:编码”> < p >亲爱的对话框中,< / p > < p >我用DA14681基本开发板。

对于一个应用程序,我想从UART1接收一些数据并发送一些数据到I2C设备。来自UART的数据包含I2C设备的地址和数据。

但是当我运行我的代码(只与UART接收),代码停止在“ASSERT_WARNING(xSemaphorePM != NULL);”

当我删除所有I2C和UART代码时,代码工作正常(测试时LED2闪烁)。

我想要的是从UART接收数据,接收一个中断,解码它并把它发送给i2c设备。因为我使用基本的开发板,所以我想为此使用UART1端口。< / p > < p >谢谢!< / p > < / div > < / div > < / div > < div class =”字段field-name-field-forum-keywords field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >关键词:,< / div > < div class = "字段条目" > < div class =”field-item甚至“> < a href = " / resource-keywords / uart”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > uart < / > < / div > < divclass="field-item odd">ad_i2c

Attachment: 
Device: 
2018年6月21日星期四20:19:39 +0000 DMeynen 197877年https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/sending-and-receiving-wont-work-uart1#comments
I2c从站使用适配器:挂起的事务和SCLK保持低 https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/i2c-slave-using-adapter-pending < div class = "字段field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >论坛:,< / div > < div class = "字段条目" > < div class =”field-item甚至“rel = " sioc: has_container " > < a href = " /论坛/ dialog-smartbond-bluetooth-low-energy - % E2 % 80% 93 -软件”“=“sioc:容器sioc:论坛”属性= " rdfs: label skos: prefLabel”数据类型= " " >对话框Smartbond蓝牙低能量-软件< / > < / div > < / div > < / div > < div class =”字段field-name-body field-type-text-with-summary field-label-hidden”> < div class = "字段条目" > < div class =”field-item甚至“财产=“内容:编码”> < p >嗨对话框中,< / p > < p >我试图使用DA1468x设备使用I2C适配器(ad_i2c_start_slave)的I2C从设备。在大多数情况下,它是有效的,但有时并不有效。

通信协议大致如下:
- wait for message header
ad_i2c_start_slave(ack, sizeof ack, msgHeader, sizeof msgHeader, callbacks, OS_EVENT_FOREVER);

ad_i2c_start_slave(ack, sizeof ack, msgPayload, sizeof msgPayload, callbacks, TIMEOUT);
ad_i2c_start_slave(ack, sizeof ack, waiting_for_result, sizeof waiting_for_result, callback, TIMEOUT);
- send result
ad_i2c_start_slave(ack, sizeof ack, result, sizeof result, callback, TIMEOUT);根据我的经验,我不能正确处理读请求回调,所以我选择始终为ad_i2c_start_slave()提供wbuf和rbuf,这样我只关心data_sent和data_received回调。所以在每个阶段(上面),i2c主机都需要发送数据和读取数据(比如一个确认)。所以基本上我在等待data_sent和data_received事件被触发,以推进协议的下一阶段(见上文)。

然而有时他们i2c总线挂起(SCLK保持低)。我猜这是因为请求的数据(或发送的数据)不是由软件处理的。 How can this happen? I think this can occur when during the switches of the buffer between each stage. However shouldn't the old buffers be used instead? or are these buffers used only one time?

Another issue that can occur I'm guess is that there's pending transactions that I do not know how to cancel in the case of timesouts. See my other post here : https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...

So my question is how can use the ad_i2c_start_slave() with timeouts the way how described in the protocol mentioned above and or do you have any suggestions on how I can implement this.

PS. The issue I was having before with read_request callback is that reading the data from the buffer didn't really stop the interrupt (RX_FULL) from continuously being triggered. Perhaps if you have suggestions how this can be done in combination with the protocol I'll be more than welcomed to hear it.

Device: 
星期三,2018年2月28日15:34:30 +0000 rajames 155288年https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/i2c-slave-using-adapter-pending#comments
I2C适配器异步写:挂起的事务问题 https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/i2c-adapter-async-write-pending < div class = "字段field-name-taxonomy-forums field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >论坛:,< / div > < div class = "字段条目" > < div class =”field-item甚至“rel = " sioc: has_container " > < a href = " /论坛/ dialog-smartbond-bluetooth-low-energy - % E2 % 80% 93 -软件”“=“sioc:容器sioc:论坛”属性= " rdfs: label skos: prefLabel”数据类型= " " >对话框Smartbond蓝牙低能量-软件< / > < / div > < / div > < / div > < div class =”字段field-name-body field-type-text-with-summary field-label-hidden”> < div class = "字段条目" > < div class =”field-item甚至“财产=“内容:编码”> < p >我使用i2c适配器(在主模式下)做的异步写或读,等待永远从回调信号OS_EVENT。
然而,与其永远等待,我希望能够设置一个超时值,以便它不会卡住,如果总线上没有设备。
但是在超时之后,如果我尝试启动另一个异步读或写,适配器会挂起,因为(例如2)有未完成的挂起事务。我如何取消这些挂起的事务,或者更好的是,怎样才能使用ad_i2c_async_read或ad_i2c_async_write超时。< / p > < / div > < / div > < / div > < div class =”字段field-name-field-forum-keywords field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >关键词:,< / div > < div class = "字段条目" > < div class =”field-item甚至“> < a href = " / resource-keywords / i2c”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > i2c < / > < / div > < div类= " field-item奇怪" > < a href = " / resource-keywords / adi2c”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > ad_i2c < / > < / div > < div class =”field-item甚至“> < a href = " / resource-keywords /大师”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " >主< / > < / div > < div class = " field-item古怪”> 超时< / > < / div > < div class =”field-item甚至“> < a href = " / resource-keywords / freertos”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > freertos < / > < / div > < div class = " field-item古怪”> < a href = " / resource-keywords /异步”typeof = " skos:概念”属性= " rdfs: label skos: prefLabel”异步数据类型= " " > < / > < / div > < div class =”field-item甚至“> < a href = " / resource-keywords /适配器”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " >适配器< / > < / div > < / div > < / div > < div class = "字段field-name-field-device field-type-taxonomy-term-reference field-label-above">
Device: 
2018年2月28日星期三14:38:44 +0000 rajames 155272年https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-%E2%80%93-software/i2c-adapter-async-write-pending#comments