41 i2c->ADDRCFG.B.MnS = 1;
42 i2c->ADDRCFG.B.SONA = 0;
43 i2c->ADDRCFG.B.SOPE = 0;
44 i2c->ADDRCFG.B.TBAM = 0;
47 i2c->FIFOCFG.B.TXFC = 1;
48 i2c->FIFOCFG.B.RXFC = 1;
49 i2c->FIFOCFG.B.TXBS = 0;
50 i2c->FIFOCFG.B.RXBS = 0;
51 i2c->FIFOCFG.B.TXFA = 0;
52 i2c->FIFOCFG.B.RXFA = 0;
64 while (i2c->CLC.B.DISS == 0)
73 volatile Ifx_SRC_SRCR *src;
82 volatile Ifx_SRC_SRCR *src;
91 volatile Ifx_SRC_SRCR *src;
100 volatile Ifx_SRC_SRCR *src;
112 i2c->CLC.B.DISR = 0U;
114 while (i2c->CLC.B.DISS == 1U)
117 i2c->CLC1.B.RMC = 1U;
119 while (i2c->CLC1.B.RMC != 1U)
122 i2c->CLC1.B.DISR = 0U;
124 while (i2c->CLC1.B.DISS == 1U)
128 i2c->ERRIRQSM.U = 0x00;
129 i2c->PIRQSM.U = 0x00;
138 volatile Ifx_SRC_SRCR *src;
147 volatile Ifx_SRC_SRCR *src;
156 uint8 inc = i2c->FDIVCFG.B.INC;
157 uint16 dec = i2c->FDIVCFG.B.DEC;
158 uint8 rmc = i2c->CLC1.B.RMC;
161 return (fKernel / rmc) / ((2 * dec / inc) + 3);
181 i2c->ENDDCTRL.B.SETEND = 1;
195 i2c->FIFOCFG.U = 0x0;
196 i2c->FIFOCFG.B.TXFC = 0U;
197 i2c->FIFOCFG.B.RXFC = 0U;
198 i2c->FIFOCFG.B.TXBS = 0U;
199 i2c->FIFOCFG.B.RXBS = 0U;
200 i2c->FIFOCFG.B.TXFA = 0U;
201 i2c->FIFOCFG.B.RXFA = 0U;
210 i2c->KRST0.B.RST = 1;
211 i2c->KRST1.B.RST = 1;
214 while (0 == i2c->KRST0.B.RSTSTAT)
219 i2c->KRSTCLR.B.CLR = 1;
227 uint8 rmc = i2c->CLC1.B.RMC;
229 dec = (((fKernel / rmc) / baudrate) - 3) / 2;
236 else if (dec > (1 << IFX_I2C_FDIVCFG_DEC_LEN) - 1)
238 dec = (1 << IFX_I2C_FDIVCFG_DEC_LEN) - 1;
245 i2c->FDIVCFG.B.INC = 1;
246 i2c->FDIVCFG.B.DEC = (
uint16)(dec + 0.5);
247 i2c->TIMCFG.B.SDA_DEL_HD_DAT = 0x3F;
248 i2c->TIMCFG.B.FS_SCL_LOW = 1;
249 i2c->TIMCFG.B.EN_SCL_LOW_LEN = 1;
250 i2c->TIMCFG.B.SCL_LOW_LEN = 0x20;