Address Setting
The address of the module during the slave mode will be stored in the I²C Bus Address Register
(IBAD) on the 7-bit field ADR.
Transfer setting
For configuring various aspects of the module, I²C BUS Control Register (IBCR) can be used.
Figure 107 : I²C Bus Control Register (R.M. Rev8 – Fig. 20-6)
Details about modifiable fields of this register:
o
MDIS: Module Disable, this bit is set on reset and it has to be cleared before using
this module.
o
IBIE: I-Bus Interrupt Enable, I²C interrupts are enabled, related to the flag IBIF
on the status register.
o
MSSL: Master/Slave mode select, 0 for slave and 1 for master. On a change from
0 to 1, a START signal is automatically generated and on the reverse change, a
STOP signal will be generated. This bit is automatically cleared if the master loses
arbitration.
o
TXRX: Transmit/Receive mode select, 1 for transmit. When operating as a slave,
this bit should be set according to the demands of the master, and when
operating as a master, it is used during the address cycle for informing the slave.
o
NOACK: Data Acknowledge Disable, when this bit is set, no acknowledge signal
will be sent. Used for stopping communication when reading as a master.
o
RSTA: Repeat Start, when 1 is written to this bit, a repeated START condition will
be generated. This can be used for changing TX/RX mode, but if it is used while
another master is controlling the bus, then a loss of arbitration will occur.
Status/Interrupt Management
Figure 108 : I²C Bus Status Register (R.M. Rev8 – Fig. 20-6)
The I²C Bus Status Register (IBSR) contains flags that are useful during communication in order
to determine the next set of actions. Different bits are:
TCF: Transfer Complete flag, when 0, a transfer is in progress and when at high a transfer
is complete. (It is at ‘1’ by default).
Summary of Contents for MPC5604B
Page 1: ...LAAS CNRS Quick Start to MPC5604B Embedded Development Sahin Serdar 21 06 2013...
Page 31: ...Figure 33 INTC SW HW mode comparison Freescale Tutorial...
Page 87: ......
Page 132: ......
Page 133: ...127 Appendix 2 Pad Configurations...
Page 134: ......
Page 135: ......
Page 136: ......
Page 137: ......
Page 138: ......
Page 139: ......
Page 140: ......
Page 141: ...Appendix 3 Peripheral input pin selection...
Page 142: ......
Page 143: ...137 Appendix 4 Interrupt Vector Table...
Page 144: ......
Page 145: ......
Page 146: ......
Page 147: ......
Page 148: ...Appendix 5 I C Baud Rate Prescaler Values...
Page 149: ......
Page 150: ......