Dialog Semiconductor customer support - I2C, RESTART https://support.dialog-semiconductor.com/resource-keywords/i2c%EF%BC%8C-restart en I2C RESTART signal https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-42-%E2%80%93-software-dialog-%E2%80%9Csmartbond%E2%80%9D%E7%B3%BB%E5%88%97%E4%BD%8E%E5%8A%9F%E8%80%97%E8%93%9D%E7%89%99bt42%E2%80%94%E8%BD%AF%E4%BB%B6-79

Hi, DIalog,
我有一个外设,是这个时序:
Start
Send Device_addr(W)
Send Reg_addr
Restart
Send Device_addr(R)
Read data
....
Stop

看了 demo_i2c.c 还是没搞清楚如何实现这个时序。
一般的I2C 时序是这样的:
Start
Send Device_addr(W/R)
Send Reg_addr
Write/Read data
....
Stop

该如何利用I2C的库函数来实现? hw_i2c_set_restart_enabled (HW_I2C_ID id, bool enabled) 如何使用?
在芯片硬件设计中,RESTART是怎样触发的?

另外,一个I2C操作过程是如何启动的?(产生START信号开始)。 demo_i2c.c 里,FM75的例子,貌似只有一个 set_target_address, 这个函数可以启动 I2C吗? 即使可以,这次I2C完成之后,下次的操作也应该重复启动I2C才对。

谢谢

Keywords: 
Device: 
Sat, 11 Feb 2017 03:37:14 +0000 jamesleo-konka 5397 at https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-42-%E2%80%93-software-dialog-%E2%80%9Csmartbond%E2%80%9D%E7%B3%BB%E5%88%97%E4%BD%8E%E5%8A%9F%E8%80%97%E8%93%9D%E7%89%99bt42%E2%80%94%E8%BD%AF%E4%BB%B6-79#comments