26.6.8 I2C Clock control register (I2C_CCR)Address offset: 0x1C
Reset value: 0x0000
Note: fPCLK1 ต้องเป็นอย่างน้อย 2 MHz เพื่อบรรลุ Sm mode I2C frequencies. มันต้องเป็นอย่างน้อย 4 MHz เพื่อบรรลุ Fm mode I2C frequencies. มันต้องเป็นผลคุณของ 10MHz เพื่อถึง the 400 kHz maximum I2C Fm mode clock.
The CCR register ต้องถูกกำหนดค่าเฉพาะเมื่อ the I2C ถูกปิดการใช้งาน (PE = 0).

Bit 15
F/S: I2C master mode selection
0: Sm mode I2C
1: Fm mode I2C
Bit 14
DUTY: Fm mode duty cycle
0: Fm mode tlow/thigh = 2
1: Fm mode tlow/thigh = 16/9 (ดู CCR)
Bits 13:12 Reserved, must be kept at reset value
Bits 11:0
CCR[11:0]: Clock control register in Fm/Sm mode (Master mode)
ควบคุม the SCL clock ใน master mode.
Sm mode หรือ SMBus:
Thigh = CCR * TPCLK1
Tlow = CCR * TPCLK1
Fm mode:
ถ้า DUTY = 0:
Thigh = CCR * TPCLK1
Tlow = 2 * CCR * TPCLK1
ถ้า DUTY = 1: (เพื่อถึง 400 kHz)
Thigh = 9 * CCR * TPCLK1
Tlow = 16 * CCR * TPCLK1
ตัวอย่างเช่น: ใน Sm mode, เพื่อสร้าง a 100 kHz SCL frequency:
ถ้า FREQR = 08, TPCLK1 = 125 ns ดังนั้น CCR ต้องถูกโปรแกรมด้วย 0x28 (0x28 <=> 40d x 125 ns = 5000 ns.)
Note: The minimum allowed value คือ 0x04, ยกเว้นใน FAST DUTY mode ที่ the minimum allowed value คือ 0x01
thigh = tr(SCL) + tw(SCLH). ดู device datasheet สำหรับ the definitions of parameters.
tlow = tf(SCL) + tw(SCLL). ดู device datasheet สำหรับ the definitions of parameters.
I2C communication speed, fSCL ~ 1/(thigh + tlow). The real frequency อาจแตกต่างกันไปเนื่องจาก the analog
noise filter input delay.
The CCR register ต้องถูกกำหนดค่าเฉพาะเมื่อ the I2C ถูกปิดการใช้งาน (PE = 0).