How to set I2C frequency of 12ZVCA MCU

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to set I2C frequency of 12ZVCA MCU

跳至解决方案
965 次查看
s_kim1
Contributor III

Hello,

I have a question about I2C of S12ZVCA19MLF MCU.

First, I have purchased and used the DEVKIT-S12ZVC development kit.

Second, the development sample source

DEVKIT-S12ZVC development platform for S12ZVC | NXP 

IIC is being reported and developed in the DEVKIT-S12ZVC Lab Examples on this site.

If you are trying to set the I2C Frequency, you have learned to set the IBFD register.

I would like to know how to specify the register value to set it to 100KHz.

If there is additional data that summarizes the I2C frequency value, please provide it.

Thanks.

0 项奖励
回复
1 解答
929 次查看
kef2
Senior Contributor V

Hi,

MC9S12ZVCRMV1.pdf Figure 1-16 IIC Block diagram shows bus_clock as an IIC module clock. The top bus clock speed of S12ZVC is 32MHz. You may choose different bus clock using PLL, but for 32MHz bus and 100kHz IIC you need SCL divider of about 32M/100k = 320. Looking into Table 16-7 in the same S12ZVC RM I see these IBFD (IBC7:0 bits) settings for SCL divider=320: 0x25, 0x5D, 0x94. 

Edward

在原帖中查看解决方案

1 回复
930 次查看
kef2
Senior Contributor V

Hi,

MC9S12ZVCRMV1.pdf Figure 1-16 IIC Block diagram shows bus_clock as an IIC module clock. The top bus clock speed of S12ZVC is 32MHz. You may choose different bus clock using PLL, but for 32MHz bus and 100kHz IIC you need SCL divider of about 32M/100k = 320. Looking into Table 16-7 in the same S12ZVC RM I see these IBFD (IBC7:0 bits) settings for SCL divider=320: 0x25, 0x5D, 0x94. 

Edward