I2C_TIMINGR configuration for STM32H753 ARM CORTEX-7
I am using the STM32H753 ARM Cortex M7 processor(Package LQFP208).
My SYSCLK runs at the max. speed of 480 MHz and I want to configure my I2C1 (polling) in the Fast Mode (400KHz).
I have configured the GPIOs and the modes but I am stuck at the "I2C_TIMINGR". I went through the I2C_TIMINGR register configuration examples on Pg. 1982 - 1984 of the reference sheet for the H753 but I wasn't able to figure out how to use those values.
As my aim is to configure the I2C in the fast mode, how and which register should I use to set it at 400 KHz speed and accordingly what values to be loaded in the Prescaler, SCLL, SCLH? The examples provided in the reference sheet are for configuring I2C @ 8MHz, 16MHz and 40MHz.
I will kindly need someone's assistance on the same. Please correct me if I am wrong with my understanding here. Also, I am new to programming so I would kindly appreciate if someone could explain this configuration part in detail for me.
PS: I can use the CubeMX tool to configure the speed for the I2C but I want to use the register flags to understand it in depth. I have attached the code for configuring the I2C1 peripheral. Pardon me as I do not have comments for the code.
Thank You,
S.B.
