主题中讨论的其他器件:SysConfig
尊敬的团队:
我们需要在终端评估 MCU r5f 上的 i2c1从站、
I2C 1从器件(MCU r5f 侧)、I2C 2主器件(A72 Linux 侧)

我们已经回顾了链路、可以在 MCU R5f 中实现 I2C 从器件
AM62A7:AM62A7主域 I2C 控制器支持从模式?-处理器论坛-处理器- TI E2E 支持论坛
void i2c_slave_test() {
I2C_Params params;
I2C_Params_init(¶ms);
params.transferMode = I2C_MODE_BLOCKING;
I2C_init();
ggI2cHandle = I2C_open(CONFIG_I2C1, ¶ms);
if (!ggI2cHandle) {
DebugP_assert(FALSE);
}
int32_t status;
I2C_Transaction i2cTransaction;
I2C_Transaction_init(&i2cTransaction);
i2cTransaction.writeBuf = NULL;
i2cTransaction.writeCount = 1U;
i2cTransaction.readBuf = NULL;
i2cTransaction.readCount = 2U;
i2cTransaction.slaveAddress = 0x49U;
i2cTransaction.masterMode = false;
status = I2C_transfer(ggI2cHandle, &i2cTransaction);
if (SystemP_SUCCESS != status) {
DebugP_assert(FALSE);
}
}
--- a/mcu_plus_sdk_am62ax_08_06_00_18/examples/drivers/ipc/ipc_rpmsg_echo_linux/am62ax-sk/mcu-r5fss0-0_freertos/example.syscfg
+++ b/mcu_plus_sdk_am62ax_08_06_00_18/examples/drivers/ipc/ipc_rpmsg_echo_linux/am62ax-sk/mcu-r5fss0-0_freertos/example.syscfg
@@ -8,6 +8,9 @@
/**
* Import the modules used in this configuration.
*/
+const i2c = scripting.addModule("/drivers/i2c/i2c", {}, false);
+const i2c0 = i2c.addInstance();
+const i2c1 = i2c.addInstance();
const ipc = scripting.addModule("/drivers/ipc/ipc");
const addr_translate = scripting.addModule("/kernel/dpl/addr_translate", {}, false);
const addr_translate1 = addr_translate.addInstance();
@@ -108,3 +111,10 @@ mcan2.MCU_MCAN.TX.$suggestSolution = "ball.D7"; /* hxh add*/
debug_log.uartLog.MCU_UART.$suggestSolution = "MCU_USART0";
debug_log.uartLog.MCU_UART.RXD.$suggestSolution = "ball.D8";
debug_log.uartLog.MCU_UART.TXD.$suggestSolution = "ball.F8";
+i2c0.$name = "CONFIG_I2C0";
+
+i2c1.$name = "CONFIG_I2C1";
+i2c1.useMcuDomainPeripherals = false;
+i2c1.I2C.$assign = "I2C1";
+i2c1.I2C.SCL.$suggestSolution = "ball.C17";
+i2c1.I2C.SDA.$suggestSolution = "ball.E17";
已在 A72上识别了从器件、存在一些问题、 在 A72 i2c2中找到了新地址、但在尝试读取或写入时、发生了超时类打印


Pinmux 是正确的
root@am62axx-evm:~# devmem2 0x000F41E8 /dev/mem opened. Memory mapped at address 0xffff82713000. Read at address 0x000F41E8 (0xffff827131e8): 0x00060000 root@am62axx-evm:~# devmem2 0x000F41EC /dev/mem opened. Memory mapped at address 0xffffa236a000. Read at address 0x000F41EC (0xffffa236a1ec): 0x00060000 root@am62axx-evm:~#
如何实现中断模式从器件和主器件对从器件的读写
您能帮我检查我的代码是否有问题吗
或者
您能提供一个用于实现从模式的演示程序吗












