您好,
我使用DA14531微型模块,带有无代码SDK 6.380.10.4和工厂编译的无代码\u 531\u独立\u设置\u 2.hex图像以及TI的HDC1000传感器。读取或写入传感器寄存器时会出现问题。
通过读取寄存器,命令如下所示(参见随附的控制台会话):
AT+IOCFG=9,7
AT+IOCFG=8,8
AT+I2CCFG=7100,16
AT+I2CREAD=0x40,0xFE
这里0x40是传感器I2C地址,0xFE是传感器寄存器地址。这样,应读取2字节传感器的制造商ID。但是,仅读取第一个ID字节,通过读取第二个字节,模块仅向传感器发送8个SCL脉冲(而不是9个),并挂起。请参阅随附的逻辑分析仪图像。上拉I2C电阻为4.7K,因此它们不是问题。大约3分钟后,模块自行复位,并在终端窗口中打印+就绪。I2C引脚的所有先前配置都被重置和遗忘。通过写入senswor配置寄存器,模块构成正确数量的SCL脉冲,但不构成通信结束时的停止条件,并使SCL线保持低位。写入通过以下命令完成,请参见所附的逻辑分析仪图像:
AT+I2CWRITE=0x40,2,0
其中2是传感器寄存器地址,0是要写入的值。
我还尝试了其他传感器以及1字节和2字节寄存器的组合。任何东西都不能按预期工作。
问题:这是模块的已知问题,应该等待新的固件发布,还是有办法解决它?
Hello。我们计划在一些新产品中使用SLG46824或SLG46826设备,并且非常欢迎这些组件通过I2C进行多时间编程——只是因为与使用OTP相比,风险更低雷电竞官网登录。
上个周末我们已经建立了IP,并且模拟显示是正确的。本周将在你的套件上测试真正的硬件。
关于该组件和采购的几个问题:
这些是用胶带贴的吗?我们如何购买T&R与必要的领导磁带,以自动SMT安装的PCBA?在我们的验证之后,我们可以以完整的T&R数量购买。这是唯一一种接收导带和完整的T&R数量的方法吗?
2) SLG46824和SLG46826对于内部2k EEprom有什么区别? It appears both devices have an internal 2k EEprom but the BLOCK diagram inside the SLG46824 datasheet does not offer the "2K EEprom Emulation" block in the graphic. Is that a documentation error?
3) Any plans to offer the same features of I2C programming AND have internal ASM support? Would be nice to have which appear to be missing from these 2 devices.
Finally, in building our 3 stage reset sequencer IP and using the simulator with DLY0 and/or DLY1 - the simulator would not show us any changes to our expected delays. That is, the rise of the DLYx output followed the VDD rail when we expected some programmed delay for this rise. Not sure if this was our fault as after investing a few hours and introducing other DLYx blocks, the simulation worked fine. Not logical but that was our experience. In the end, we do not believe we did anything different but the simulation started to work (using the PROBES to monitor). Will see if we can replicate the quirk but for now, since we appear to be operational, it is not a worry.
For closure, will test on the hardware kits.
Thanks!
uint16_t degrees;
cmd = Temp_H;
user_i2c_set_slave_address(Si705_I2C_ADDRESS);
读取字节的代码如下:
void user_i2c_multi_byte_read(uint32_t reg_address, uint8_t *rd_data,
Uint32_t index = 0;
for(Uint32_t I = 0;
Uint32_t index = 0;我& lt;num_bytes;){
SEND_I2C_COMMAND(0x0100 &0 x3ff); // Set R/W bit to 1 (read access) MSB
if(!(++i % 24)){ //FIFO is 32 bits
WAIT_UNTIL_I2C_FIFO_IS_EMPTY(); // Wait until Tx FIFO is empty
WAIT_UNTIL_NO_MASTER_ACTIVITY(); // wait until no master activity
for (uint8_t j = 0; j < 24; j++){
//Store the FIFO contents in ram
rd_data[index++] = (0xFF & GetWord16(I2C_DATA_CMD_REG)); // Get received byte
}
reg_address += 24/(i2c_cfg_env.register_width + 1);//Calculate the next register to read out
user_i2c_send_address(reg_address); //Restart the read
}
}
WAIT_UNTIL_I2C_FIFO_IS_EMPTY(); // Wait until I2C Tx FIFO empty
WAIT_UNTIL_NO_MASTER_ACTIVITY();
while(index < num_bytes){
rd_data[index++] = (0xFF & GetWord16(I2C_DATA_CMD_REG)); // Get received byte
}
WAIT_UNTIL_I2C_FIFO_IS_EMPTY(); // Wait until Tx FIFO is empty
WAIT_UNTIL_NO_MASTER_ACTIVITY(); // wait until no master activity }
嗨,
我的I2C总线上有两个设备(eeprom和另一个设备),总线上连接有外部上拉-scl,sda(4.7k).添加外部上拉后,我观察到电流消耗量出现波动-约500uA连续消耗(芯片休眠时也是如此)。一旦移除外部上拉,这种现象就会消失。一个潜在原因可能是i2c线路未被停用。
我初始化i2c的代码如下所示:
GPIO_配置引脚(GPIO_端口0,GPIO_引脚6,输入,PID_I2C_SCL,false);GPIO_配置引脚(GPIO_端口0,GPIO_引脚7,输入,PID_I2C_SDA,false);I2C_eeprom_初始化();I2C_eeprom_读取数据();I2C_eeprom_释放()
我试图将scl、sda线路重新配置回gpio状态,但这对电流消耗没有帮助。
有没有一种方法可以停用i2c传输的内部上拉以帮助电流消耗?您能提供任何关于调试的额外输入吗?
在编程尝试过程中,SDA在启动后1mS左右达到3.3V,在3.3mS左右达到0。
是否断言了IO6的出厂设置值,如果是,是否可以更改?< / 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 / slg46826”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > SLG46826 < / > < / div > < div class = " field-item古怪”> < a href = " / resource-keywords / i2c”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > i2c < / > < / div > < / div > < / div > < div class =”字段field-name-field-device field-type-taxonomy-term-reference field-label-above”> < div class = "字段标签" >设备:< / div > < div类= "字段条目" > < div class =”field-item甚至“> < a href = " / forum-post-device / da14580”“=“skos:概念”属性=“rdfs: label skos: prefLabel”数据类型= " " > da14580 < / > < / div > < / div > < / div > < div class =”字段field-name-field-forum-device-number field-type-text field-label-above”> < div class = "字段标签" >设备数量:< / div > < div类= "字段条目" > < div class =”field-item甚至“> SLG46826V < / div > < / div > < / div >
我正在使用i2c适配器(在主模式下)用于执行异步写入或读取,永远等待从回调发出OS_事件信号。
但是,我希望能够设置一个超时值,以便在总线上没有设备时不会卡住。
但在超时后,如果我尝试启动另一个异步读取或写入适配器,则会尝试设置超时值。
r挂起是因为(例如2)有未完成的挂起事务。我如何取消这些挂起事务,或者更好的是,如何正确地使用ad_i2c_async_读取或ad_i2c_async_写入超时。
是否可以使用GPAK将UART转换为I2C?