
Inter-Integrated Circuit Bus Controller Module (I
2
C)
PXN20 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor
32-23
After the last DMA write (TX mode) to the I
2
C the module immediately starts the next I
2
C-bus transfer.
The same is true for RX mode. After the DMA read from the IBDR register the module initiates the next
I
2
C-bus transfer. This results in two possible scenarios in the DMA mode exiting scheme.
1. Fast reaction
The DMAEN bit is cleared before the next I
2
C-bus transfer completes. In this case, the module
raises an interrupt request to the CPU which can be serviced normally.
2. Slow reaction
The DMAEN bit is cleared after the next I
2
C-bus transfer has already completed. In this case, the
module does not raise an interrupt request to the CPU. Instead, the TCF bit can be read to determine
that the transfer completed and the module is ready for further transfer.
32.5.2.3.1
Fast vs. Slow Reaction
The reaction time T
R
for the system to disable DMAEN after the last DMA controller access to the I
2
C is
the time required for one byte transfer over the I
2
C. In a fast reaction the disabling has to occur before the
ninth bit of the data transfer, which is the ACK bit. So the time available is eight times the SCL period.
T
R
= 8 x T
SCL
Eqn. 32-5
In fast mode, with 400 kbit/s, T
SCL
is 2.5
s, so T
R
is 20
s.
Depending on the system and DMA controller there are different possibilities for the deassertion of
DMAEN. Three options are:
1. CPU intervention via interrupt
The DMA controller is programmed to signal an interrupt to the CPU which is then responsible for
the deassertion of DMAEN. This scheme is supported by most systems but can result in a slow
reaction time if higher priority interrupts interfere. Therefore, the interrupt handling routine can
become complicated as it has to check which of the two scenarios happened (check TCF bit) and
act accordingly. In case of slow reaction you can force an interrupt for the I
2
C in the interrupt
controller to have the further transfer handled by the normal I
2
C interrupt routine. The use of nested
interrupts can cause problems in this scenario, if the DMA interrupt stalls between the deassertion
and the DMAEN bit and the checking of the TCF bit.
2. DMA channel linking (if supported)
The transfer control descriptor in the DMA controller that performs the data transfer is linked to
another channel that does a write to the I
2
C IBCR register to disable the DMAEN bit. This is
probably the fastest system solution, but it uses two DMA channels. On the system level, no higher
priority DMA requests must occur between the two linked TCDs because those can result in slow
reaction.
3. DMA scatter/gather process (if supported)
The transfer control descriptor in the DMA controller that performs the data transfer has the
scatter-gather feature activated. This feature initiates a reload of another TCD from system RAM
after the completion of the first TCD. The new TCD has its start bit already set and immediately
starts the required write to the I
2
C IBCR register to disable the DMAEN bit. This TCD also has
scatter-gather activated and is programmed to reload the initial TCD upon completion, bringing the
Содержание PXN2020
Страница 1: ...PXN20 Microcontroller Reference Manual Devices Supported PXN2020 PXN2120 PXN20RM Rev 1 06 2011...
Страница 42: ...PXN20 Microcontroller Reference Manual Rev 1 lxiv Freescale Semiconductor...
Страница 64: ...Introduction PXN20 Microcontroller Reference Manual Rev 1 1 22 Freescale Semiconductor...
Страница 112: ...Signal Description PXN20 Microcontroller Reference Manual Rev 1 3 44 Freescale Semiconductor...
Страница 118: ...Resets PXN20 Microcontroller Reference Manual Rev 1 4 6 Freescale Semiconductor...
Страница 162: ...Clocks Reset and Power CRP PXN20 Microcontroller Reference Manual Rev 1 6 30 Freescale Semiconductor...
Страница 182: ...Frequency Modulated Phase Locked Loop FMPLL PXN20 Microcontroller Reference Manual Rev 1 7 20 Freescale Semiconductor...
Страница 268: ...Boot Assist Module BAM PXN20 Microcontroller Reference Manual Rev 1 9 14 Freescale Semiconductor...
Страница 318: ...Interrupts and Interrupt Controller INTC PXN20 Microcontroller Reference Manual Rev 1 10 50 Freescale Semiconductor...
Страница 326: ...General Purpose Static RAM SRAM PXN20 Microcontroller Reference Manual Rev 1 11 8 Freescale Semiconductor...
Страница 372: ...e200z6 Core Z6 PXN20 Microcontroller Reference Manual Rev 1 13 8 Freescale Semiconductor...
Страница 412: ...e200z0 Core Z0 PXN20 Microcontroller Reference Manual Rev 1 14 14 Freescale Semiconductor...
Страница 460: ...Memory Protection Unit MPU PXN20 Microcontroller Reference Manual Rev 1 18 20 Freescale Semiconductor...
Страница 478: ...Error Correction Status Module ECSM PXN20 Microcontroller Reference Manual Rev 1 19 18 Freescale Semiconductor...
Страница 488: ...Software Watchdog Timer SWT PXN20 Microcontroller Reference Manual Rev 1 20 10 Freescale Semiconductor...
Страница 494: ...System Timer Module STM PXN20 Microcontroller Reference Manual Rev 1 21 6 Freescale Semiconductor...
Страница 821: ...Media Local Bus MLB PXN20 Microcontroller Reference Manual Rev 1 Freescale Semiconductor 27 49...
Страница 822: ...Media Local Bus MLB PXN20 Microcontroller Reference Manual Rev 1 27 50 Freescale Semiconductor...
Страница 926: ...Controller Area Network FlexCAN PXN20 Microcontroller Reference Manual Rev 1 29 42 Freescale Semiconductor...
Страница 990: ...Deserial Serial Peripheral Interface DSPI PXN20 Microcontroller Reference Manual Rev 1 30 64 Freescale Semiconductor...
Страница 1044: ...Enhanced Serial Communication Interface eSCI PXN20 Microcontroller Reference Manual Rev 1 31 54 Freescale Semiconductor...
Страница 1080: ...Cross Triggering Unit CTU PXN20 Microcontroller Reference Manual Rev 1 33 12 Freescale Semiconductor...
Страница 1134: ...Analog to Digital Converter ADC PXN20 Microcontroller Reference Manual Rev 1 34 54 Freescale Semiconductor...
Страница 1150: ...IEEE 1149 1 Test Access Port Controller JTAGC PXN20 Microcontroller Reference Manual Rev 1 35 16 Freescale Semiconductor...
Страница 1257: ...Nexus Development Interface NDI PXN20 Microcontroller Reference Manual Rev 1 Freescale Semiconductor 36 107...
Страница 1258: ...Nexus Development Interface NDI PXN20 Microcontroller Reference Manual Rev 1 36 108 Freescale Semiconductor...
Страница 1376: ...Memory Map PXN20 Microcontroller Reference Manual Rev 1 A 118 Freescale Semiconductor...