Need to change I2C bus speed to 50KHz

Hi Folks,
I’m working with an I2C LCD rated for up to 50KHz and it is showing a fair number of glitches. Can anyone tell me how to lower the I2C speed from the default values, which I understand to be 100KHz, minimum?  The platform is the nRF Feather, board rev 5. I have posted this over in Circuit Dojo.

I tried the I2C_SPEED_SET() macro, which threw a warning and I tried a few speed settings in the overlay file but am still seeing display glitches. Does anyone know the proper way to do is?

Thanks,
Jim

Parents
  • Hi,

    The I2C driver will throw an error if you try to configure anything else than the supported speeds. It will not be possible to configure this through the APIs in nRF Connect SDK or Zephyr. If you need to try out different speeds, you will have to write directly to the FREQUENCY register of the TWI(M) peripheral, after configuration and before transmits. Note that only the defined speeds mentioned in the register documentation (100K/250K/400K) is supported and tested, all other values are used at your own risk. We do not provide register values for other speeds.

    Best regards,
    Jørgen

Reply
  • Hi,

    The I2C driver will throw an error if you try to configure anything else than the supported speeds. It will not be possible to configure this through the APIs in nRF Connect SDK or Zephyr. If you need to try out different speeds, you will have to write directly to the FREQUENCY register of the TWI(M) peripheral, after configuration and before transmits. Note that only the defined speeds mentioned in the register documentation (100K/250K/400K) is supported and tested, all other values are used at your own risk. We do not provide register values for other speeds.

    Best regards,
    Jørgen

Children
No Data
Related