How to change I2C frequency from 400KHz to 100KHz?
Is the below right? Should I modify others?
Before:
#define PSP_I2C_MAX_BUS_FREQ (400000u) /* 400 KHz */
Current:
#define PSP_I2C_MAX_BUS_FREQ (100000u) /* 100 KHz */
Best Regards,
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
How to change I2C frequency from 400KHz to 100KHz?
Is the below right? Should I modify others?
Before:
#define PSP_I2C_MAX_BUS_FREQ (400000u) /* 400 KHz */
Current:
#define PSP_I2C_MAX_BUS_FREQ (100000u) /* 100 KHz */
Best Regards,
Hi,
Can you provide more information like which device you are refering to.
Assuming that you are refering to C5515 device & to set I2C serial clock frequency to 100Khz you need to do appropriate configuration using the below mentioned formula.
SCL low period = (SYSCLK period) * (IPSC + 1) * (ICCL + d)
SCL high period = (SYSCLK period) * (IPSC + 1) * (ICCH + d)
Based on your system clock frequency you need to configure IPSC , ICCL, ICCH values appropriately to acheive 100KHz serial frequency.This is also explained in respective I2C userguide.
Hope the above information helps.
Regards
Vasanth