I2C 有三种模式:标准模式有100k的速度,快速模式有400k的速度,高速模式有3.4M的速度。 STM32的I2C还可以用DMA来操控。 (2)设置I2C的占空比:注意该参数只有I2C工作在快速模式下(即SCK时钟频率高于100kHz)下才有意义。 /* enable I2C1 */ I2C_Cmd(I2C1, ENABLE); /* I2C1 ...
As one of the most popular buses today for on- and inter-board communication within systems, there’s a good chance you’ll end up using it with an embedded system. I2C offers a variety of speeds while ...