36.5.10 Double buffering mode
In the double buffering mode, the data transfer is processed byte by byte. However, the
data can be transferred without waiting for the interrupt or the polling to finish. This
means the write/read I2C_D operation will not block the data transfer, as the hardware
has already finished the internal write or read. The benefit is that the baud rate is able to
achieve higher speed.
There are several items to consider as follows:
• When initiating a double buffering transfer at Tx side, the user can write 2 values to
the I2C_D buffer before transfer. However, that is allowed only at one time per
package frame (due to the buffer depth, and because two-times writes in each ISR are
not allowed). The second write to the I2C_D buffer must wait for the Empty flag. On
the other hand, at Rx side the user can read twice in a one-byte transfer (if needed).
NOTE
Check Empty flag before write to I2C_D.
Write twice to the I2C_D buffer ONLY after the address
matching byte. Do not write twice (Data) before
START or at the beginning of I2C transfer, especially when
the baud rate is very slow.
• To write twice in one frame, during the next-to-last ISR, do a dummy read from the
I2C_D buffer at Tx side (or the TCF will stay high, because the TCF is cleared by
write/read operation). In the next-to-last ISR, do not send data again (the buffer data
will be under running).
• To keep new ISRs software-compatible with previous ISRs, the write/read I2C_D
operation will not block the internal-hardware-released SCL/SDA signals. At the
ACK phase, the bus is released to accept the next byte if the master can send the
clock immediately.
• On the slave side, two-times writes to the I2C_D buffer may be limited by the
master's clock and START/repeated-START signal. This is not currently supported,
and the master's START/repeated-START signal will break data transfers. To release
the bus, do a dummy read or write to the I2C_D buffer again. It is suggested to send
repeated-START/START during intervals as before.
• The master receive should send a NACK in the next-to-last ISR, if it wants to do the
STOP or the repeated-START work. The transmitting slave which receives the
NACK, will switch to receive mode, and do a dummy read to release SCL and SDA
signals.
Functional description
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
642
Freescale Semiconductor, Inc.
Содержание MKL27Z128VFM4
Страница 2: ...KL27 Sub Family Reference Manual Rev 5 01 2016 2 Freescale Semiconductor Inc...
Страница 54: ...AWIC introduction KL27 Sub Family Reference Manual Rev 5 01 2016 54 Freescale Semiconductor Inc...
Страница 100: ...Module operation in low power modes KL27 Sub Family Reference Manual Rev 5 01 2016 100 Freescale Semiconductor Inc...
Страница 142: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 142 Freescale Semiconductor Inc...
Страница 248: ...Memory map and register descriptions KL27 Sub Family Reference Manual Rev 5 01 2016 248 Freescale Semiconductor Inc...
Страница 256: ...Memory map register descriptions KL27 Sub Family Reference Manual Rev 5 01 2016 256 Freescale Semiconductor Inc...
Страница 262: ...Initialization application information KL27 Sub Family Reference Manual Rev 5 01 2016 262 Freescale Semiconductor Inc...
Страница 292: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 292 Freescale Semiconductor Inc...
Страница 324: ...Functional Description KL27 Sub Family Reference Manual Rev 5 01 2016 324 Freescale Semiconductor Inc...
Страница 390: ...Application information KL27 Sub Family Reference Manual Rev 5 01 2016 390 Freescale Semiconductor Inc...
Страница 422: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 422 Freescale Semiconductor Inc...
Страница 432: ...Initialization Application Information KL27 Sub Family Reference Manual Rev 5 01 2016 432 Freescale Semiconductor Inc...
Страница 442: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 442 Freescale Semiconductor Inc...
Страница 512: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 512 Freescale Semiconductor Inc...
Страница 610: ...Initialization application information KL27 Sub Family Reference Manual Rev 5 01 2016 610 Freescale Semiconductor Inc...
Страница 646: ...Initialization application information KL27 Sub Family Reference Manual Rev 5 01 2016 646 Freescale Semiconductor Inc...
Страница 744: ...Application information KL27 Sub Family Reference Manual Rev 5 01 2016 744 Freescale Semiconductor Inc...
Страница 784: ...Application Information KL27 Sub Family Reference Manual Rev 5 01 2016 784 Freescale Semiconductor Inc...
Страница 830: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 830 Freescale Semiconductor Inc...
Страница 850: ...Application information KL27 Sub Family Reference Manual Rev 5 01 2016 850 Freescale Semiconductor Inc...
Страница 886: ...Functional description KL27 Sub Family Reference Manual Rev 5 01 2016 886 Freescale Semiconductor Inc...