i2c remap 问题

[复制链接]
4227|3
 楼主| shao110 发表于 2008-11-13 12:57 | 显示全部楼层 |阅读模式
我把i2c的scl(pb6)和sda(pb7)remap到pb8,pb9
  GPIO_PinRemapConfig(GPIO_Remap_I2C1,ENABLE);
  /* Configure I2C1 pins: SCL and SDA */
  GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_8 | GPIO_Pin_9;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD;
  GPIO_Init(GPIOB, &GPIO_InitStructure);

读取温度设备,温度传感器正确
eeprom 就不正常了,那位高手知道原因
mochou 发表于 2012-1-10 15:39 | 显示全部楼层
LZ问题解决了吗
mochou 发表于 2012-1-10 15:50 | 显示全部楼层
哪位大侠解决此问题,可以分享啊。
chensheng08 发表于 2013-5-15 09:44 | 显示全部楼层
如果PB6,PB7是用来读温度传感器的话,建议换另一个脚,就正常了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

6

主题

16

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部