<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rt-thread.git/bsp/stm32/libraries/HAL_Drivers/drivers/drv_hard_i2c.c, branch v5.2.0</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/rt-thread.git/atom/bsp/stm32/libraries/HAL_Drivers/drivers/drv_hard_i2c.c?h=v5.2.0</id>
<link rel='self' href='http://cgit.235523.xyz/rt-thread.git/atom/bsp/stm32/libraries/HAL_Drivers/drivers/drv_hard_i2c.c?h=v5.2.0'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/'/>
<updated>2024-12-13T22:46:07Z</updated>
<entry>
<title>[bsp][stm32] hardware i2c driver add support for STM32F1 series</title>
<updated>2024-12-13T22:46:07Z</updated>
<author>
<name>zzk597</name>
<email>63964145+zzk597@users.noreply.github.com</email>
</author>
<published>2024-12-13T22:46:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=02a114985a8cd10d69c757787ed174c6c3f0cb12'/>
<id>urn:sha1:02a114985a8cd10d69c757787ed174c6c3f0cb12</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[stm32] i2c hard driver fixup：增加硬件I2C传输超时等待时间</title>
<updated>2024-05-04T16:51:27Z</updated>
<author>
<name>SCZeiDan</name>
<email>53632180+SCZeiDan@users.noreply.github.com</email>
</author>
<published>2024-05-04T16:51:27Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=d78429eb8e3222d094ee8048e53c229117e18916'/>
<id>urn:sha1:d78429eb8e3222d094ee8048e53c229117e18916</id>
<content type='text'>
问题：
在使用硬件 I2C 驱动进行音频模块 WM8978 配置时，发现连续 rt_i2c_transfer 进行 I2C 传输时发现，连续多次调用 rt_i2c_transfer 会出现丢包现象；溯源发现是每次使用 rt_i2c_transfer 传输2字节，传输频率过高导致底层 HAL_I2C_Master_Seq_Transmit_DMA 报错 HAL_BUSY；

现象：
rt_completion_wait超时等待完成之后，I2C仍处于HAL_I2C_STATE_BUSY_TX状态，且后续第二次运行至HAL_I2C_Master_Seq_Transmit_DMA时会直接返回HAL_BUSY，从而直接 goto out; 退出而不会再次进行超时等待；

* drv_hard_i2c.c: 修复325行缺失'}'语法错误;更改HAL_I2C_xx_Transimt_xx调用中目标设备地址值;i2c_hard_config.h: 添加STM32F系列芯片xx_DMA_CONFIG宏定义;

* 回溯I2C设备地址传参处(msg-&gt;addr&lt;&lt;1)修改；

* fixup: 增加硬件I2C传输延时，解决连续传输导致HAL_BUSY状态；</content>
</entry>
<entry>
<title>[bsp][stm32] fix bugs of i2c hardware drivers</title>
<updated>2024-04-24T05:42:03Z</updated>
<author>
<name>SCZeiDan</name>
<email>53632180+SCZeiDan@users.noreply.github.com</email>
</author>
<published>2024-04-24T05:42:03Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=7ca2ebc51ad0bacc99d239240fd6a20b93acde78'/>
<id>urn:sha1:7ca2ebc51ad0bacc99d239240fd6a20b93acde78</id>
<content type='text'>
在STM32F429IGTx设备上使用硬件i2c驱动程序师遇到以下几个问题：

语法错误：drv_hard_i2c.c 行67、68中i2c_handle未正常替换过来，估计是上个版本对变量重命名后因为宏定义忽略了此处修改；
语法错误：drv_hard_i2c.c 行326中缺少一个"}"导致编译出错；
初始化i2c设备过程中对双地址选项进行设置时（i2c_handle-&gt;Init.OwnAddress2Masks = I2C_OA2_NOMASK），STM32F4系列SOC没有这个配置定义，于是我直接将双地址模式关闭了（i2c_handle-&gt;Init.DualAddressMode = I2C_DUALADDRESS_DISABLE）；
初始化i2c设备（DMA方式）过程中发现i2c_hard_config.h文件中未定义DMA通道配置；

主要补丁如下：
修复硬件i2c驱动代码中语法错误（drv_hard_i2c.c行67、68、326）；
关闭默认i2c双地址模式（drv_hard_i2c.c行75：I2C_DUALADDRESS_DISABLE）；
添加硬件i2c驱动配置文件DMA相关配置项，增加对SOC_SERIES_STM32F2、SOC_SERIES_STM32F4、SOC_SERIES_STM32F7系列芯片配置DMA_CHANNEL的适配</content>
</entry>
<entry>
<title>[bsp][stm32] fix hardware i2c driver bug</title>
<updated>2024-04-02T03:21:09Z</updated>
<author>
<name>Dyyt587</name>
<email>67887002+Dyyt587@users.noreply.github.com</email>
</author>
<published>2024-04-02T03:21:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=34fb8d2f10f4671fea8a39f3f7a724e989ba4ce6'/>
<id>urn:sha1:34fb8d2f10f4671fea8a39f3f7a724e989ba4ce6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[bsp][stm32] format code of i2c hardware drivers</title>
<updated>2024-03-08T05:29:32Z</updated>
<author>
<name>Meco Man</name>
<email>920369182@qq.com</email>
</author>
<published>2024-03-08T04:14:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=b85c4cade2cd730305e66c9c215a8c8e53c20e95'/>
<id>urn:sha1:b85c4cade2cd730305e66c9c215a8c8e53c20e95</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[bsp][stm32] add hardware i2c driver</title>
<updated>2024-03-08T03:59:47Z</updated>
<author>
<name>Dyyt587</name>
<email>67887002+Dyyt587@users.noreply.github.com</email>
</author>
<published>2024-03-08T03:59:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=4e1626703f59e763e4ccc96f2176a67e7cde51d9'/>
<id>urn:sha1:4e1626703f59e763e4ccc96f2176a67e7cde51d9</id>
<content type='text'>
</content>
</entry>
</feed>
