Dear Nordic Team,
I was trying to use the I2C peripheral on the nRF5340 with clock speed of 1MHz, but I kept getting the error "unsupported speed". I was using the function call below for this:
i2c_configure(i2c_dev, I2C_SPEED_SET(I2C_SPEED_FAST_PLUS) | I2C_MODE_MASTER);
I noticed that the Nordic low level driver in NCS 1.8.0 seems to support this from the code below found in nrf_twim.h in the NRFX HAL
#if NRF_TWIM_HAS_1000_KHZ_FREQ
NRF_TWIM_FREQ_1000K = TWIM_FREQUENCY_FREQUENCY_K1000 ///< 1000 kbps.
#endif
But the Zephyr driver for for Nordic does not (code snippet below taken from i2c_nrfx_twim.c)
switch (I2C_SPEED_GET(dev_config)) {
case I2C_SPEED_STANDARD:
nrf_twim_frequency_set(inst->p_twim, NRF_TWIM_FREQ_100K);
break;
case I2C_SPEED_FAST:
nrf_twim_frequency_set(inst->p_twim, NRF_TWIM_FREQ_400K);
break;
default:
LOG_ERR("unsupported speed");
return -EINVAL;
}
When do you plan to fix this?
Thank you,
Rafael