Hi,
we have nRF54H20DK (SoC rev. "C"). connected to MAX77655 via I2C (SCL ~ P1.0, SDA ~ P1.4 according to I2C restriction).
I am trying to test i2c131 for reading/writing data but I can only transfer the first byte (I2C Maxim IC address = 0x44). The other bytes seem to be random and do not depend on the input parameters of the I2C function.
I want to send 3 bytes, but without success.
value "ret" != 0
SDK: v2.9.0-nRF54H20-rc1
IDE: VSCode + nRF Connect plugin
PC: Windows 11 Pro
hardware: nRF54H20DK
I aware of this note in documentation: "[19] Only SPI master and UART will be supported for the initial limited sampling. " Is this right? Is there any workaround?
Thanks.
code fragment
#define MAX77655_I2C_ADR 0x44
uint8_t i2c_tx_buffer[] = { 4, 7, 1 };
if(device_is_ready(dev_i2c_ptr)) {
int config_result = false;
printk("I2C master device IS ready!\n");
// config_result = i2c_configure(dev_i2c_ptr, I2C_SPEED_SET(I2C_SPEED_STANDARD) | I2C_MODE_CONTROLLER ); // I2C_MODE_MASTER
}
else {
printk("I2C master device not ready!\n");
}
ret = i2c_write(dev_i2c_ptr, i2c_tx_buffer, sizeof(i2c_tx_buffer), MAX77655_I2C_ADR);
Kconfig
prj.cfg CONFIG_GPIO=y CONFIG_I2C=y
Overlay
&i2c131 {
compatible = "nordic,nrf-twim";
status = "okay";
pinctrl-1 = <&i2c131_sleep>;
pinctrl-0 = <&i2c131_default>;
pinctrl-names = "default", "sleep";
clock-frequency = <I2C_BITRATE_STANDARD>;
};
&pinctrl {
i2c131_default: i2c131_default {
group1 {
psels = <NRF_PSEL(TWIM_SCL, 1, 0)>, // SCK signal must be at pin 0..3 in each port. These pins cannot be used for other SPIS signals.
<NRF_PSEL(TWIM_SDA, 1, 4)>;
bias-pull-up; // bias only in this power mode
};
};
i2c131_sleep: i2c131_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SCL, 1, 0)>, // SCK signal must be at pin 0..3 in each port. These pins cannot be used for other SPIS signals.
<NRF_PSEL(TWIM_SDA, 1, 4)>;
low-power-enable;
};
};
};

Source code: TWI_USB.ZIP



