I'm running similar tests on the I2C I2FDR in an MCF5329 and and getting similar baffling results.
> Why are there multiple frequency dividers?
Good question. The two tables (0x00 - 0x1F and 0x20 - 0x3F) seem to be slightly different attempts at "logorithmic curve fitting". One is based on "10, 12, 14, 16" and the other on "10, 12, 15, 18" (see below).
But why should they have those duplicate entries, and why are you seeing them not be duplicates? I'm measuring that as well.
The divider for "0x0e" is listed as 192, which with my 80MHz clock should give 416.66kHz, but I'm measuring 400kHz. That means it seems to be dividing by 200 instead of 192.
The divider 0x31 is listed to give 192, and with it I'm measuring 416.7kHz as expected.
More surprisingly, setting I2FDE to "0" should divide by 28, but I'm seeing 2.0MHz, meaning it is dividing by 40! But the signal is looking pretty bad so I've just put a 1k pullup resistor on SCL and the frequency increases to 2.425 MHz, or divide by 33.
With that 1k pullup on the SCL signal (in parallel with the 4.7k one already there) with an I2FDR value of 0x0E I get 416.7kHz, matching the table.
It all becomes clear. The I2FDR description includes the comment "Due to potentially slow I2C_SCL and I2C_SDA rise and fall times, bus signals are sampled at the prescaler frequency.". As well, I2C allows the slave device to extend the clock timing by clamping the clock to ground for as long as it likes. The Master has to monitor the SCL signal for this condition. With a large pullup and a slow rise time, the master is seeing the SCL signal being extended, and is slowing down the timing. It would also seem that "0x0E" and "0x31" use different prescalers, and 0x31 isn't extending the SCL timing on a slow rrise time whereas 0x0E is.
So put a smaller pullup on your SCL (and SDA) signals and you'll probably see the 0x0d and 0x30 ones giving the same result.
This divider is simple compared to the MPC chips. Read AN2919 for details on how the tables in those chips specify one divider giving ratios of 18, 20, 24, 30, 10, 12, 14 and 16 combined with another divider of 16, 32, 64, 128, 256, 512, 1024 and 2048, together with another divider and a factor of "3". I think the MCF I2FDR might be a simplified version of the MCP ones.
Yes, these are the division ratios, the repeating pattern (apart from the slightly weird low numbers) is pretty obvious when you look at it like this:
0x00 28 14 * 2 0x01 30 15 * 2 0x02 34 17 * 2 0x03 40 10 * 4 0x04 44 11 * 40x05 48 12 * 4 0x06 56 14 * 4 0x07 68 17 * 4 0x08 80 10 * 8 0x09 88 11 * 8 0x0A 104 13 * 8 0x0B 128 16 * 8 0x0C 144 18 * 8 0x0D 160 10 * 16 <-- All "10, 12, 15, 18" from here on down 0x0E 192 12 * 16 0x0F 240 15 * 16 0x10 288 18 * 16 0x11 320 10 * 32 0x12 384 12 * 32 0x13 480 15 * 32 0x14 576 18 * 32 0x15 640 10 * 64 0x16 768 12 * 64 0x17 960 15 * 64 0x18 1152 18 * 64 0x19 1280 10 * 1280x1A 1536 12 * 1280x1B 1920 15 * 1280x1C 2304 18 * 1280x1D 2560 10 * 2560x1E 3072 12 * 2560x1F 3840 15 * 256
0x20 20 10 * 2
0x21 22 11 * 2
0x22 24 12 * 2
0x23 26 13 * 2
0x24 28 14 * 2
0x25 32 16 * 2
0x26 36 18 * 2
0x27 40 10 * 4
0x28 48 12 * 4
0x29 56 14 * 4
0x2A 64 16 * 4
0x2B 72 18 * 4
0x2C 80 10 * 8 <-- All "10, 12, 14, 16" from here on down
0x2D 96 12 * 8
0x2E 112 14 * 8
0x2F 128 16 * 8
0x30 160 10 * 16
0x31 192 12 * 16
0x32 224 14 * 16
0x33 256 16 * 16
0x34 320 10 * 32
0x35 384 12 * 32
0x36 448 14 * 32
0x37 512 16 * 32
0x38 640 10 * 64
0x39 768 12 * 64
0x3A 896 14 * 64
0x3B 1024 16 * 64
0x3C 1280 10 * 128
0x3D 1536 12 * 128
0x3E 1792 14 * 128
0x3F 2048 16 * 128
Tom