![Cypress PSoC CY8C23533 Technical Reference Manual Download Page 367](http://html1.mh-extra.com/html/cypress/psoc-cy8c23533/psoc-cy8c23533_technical-reference-manual_2706366367.webp)
Document # 001-20559 Rev. *D
303
I2C
There are three possible outcomes as a result of setting the
Start Gen bit.
1. The bus is free and the start condition is generated suc-
cessfully. A Byte Complete interrupt is generated after
the start and the address byte transmitted. If the address
is ACK’ed by the receiver, the firmware then proceeds to
send data bytes.
2. The start command is too late. Another master in a multi-
master environment has generated a valid start and the
bus is busy. The resulting behavior depends upon
whether Slave mode is enabled.
Slave mode is enabled: A start and address byte inter-
rupt is generated. When reading the I2C_MSCR register,
the master sees that the Start Gen bit is still set and that
the I2C_SCR register has the Address bit set, indicating
that the block is addressed as a slave.
Slave mode is not enabled: The Start Gen bit remains
set and the start is queued, until the bus becomes free
and the start condition is subsequently generated. An
interrupt is generated at a later time, when the start and
address byte have been transmitted.
3. The start is generated, but the master loses arbitration to
another master in a multi-master environment. The
resulting behavior depends upon whether Slave mode is
enabled.
Slave mode is enabled: A start and address byte inter-
rupt is generated. When reading the I2C_MSCR, the
master sees that the Start Gen bit cleared, indicating that
the start was generated. However, the Lost Arb bit is set
in the I2C_SCR register. The Address status is also set,
indicating that the block has been addressed as a slave.
The firmware then ACKs or NACKs the address to con-
tinue the transfer.
Slave mode is not enabled: A start and address byte
interrupt is generated. The Start Gen bit is cleared and
the Lost Arb bit is set. The hardware waits for command
input, stalling the bus if necessary. In this case, the mas-
ter clears the I2C_SCR register, to release the bus and
allow the transfer to continue, and the block idles.
Other cases where the Start bit is used to generate a Start
condition are as follows.
1. When a master is finished with a transfer, a NACK is
written to the I2C_SCR register (in the case of the mas-
ter receiver) or the transmit bit is cleared (in case of a
master transmitter). Normally, the action frees the stall
and generates a stop condition. However, if the Start bit
is set and an address is written into the data register
prior to the I2C_SCR write, a stop, followed immediately
by a start (minimum bus free time), is generated. In this
way, messages may be chained.
2. When a master transmitter is NACK’ed, an automatic
stop condition is generated on the subsequent I2C_SCR
write. However, if the Start Gen bit has previously been
set, the stop is immediately followed by a start condition.
For additional information, refer to the
Table 28-5. I2C_MSCR Master Status/Control Register
Bit
Access
Description
Mode
3
R
Bus Busy
This bit is set to ‘1’ when any start condition is
detected and reset to ‘0’ when a stop condition
is detected.
Master
Only
2
R
Master Mode
This bit is set to ‘1’ when a start condition,
generated by this block, is detected and reset
to ‘0’ when a stop condition is detected.
Master
Only
1
RW
Restart Gen
1 = Generate a Restart condition.
This bit is cleared by hardware when the start
generation is complete.
Master
Only
0
RW
Start Gen
1 = Generate a start condition and send a byte
(address) to the I2C bus.
This bit is cleared by hardware when the start
generation is complete.
Master
Only
Summary of Contents for PSoC CY8C23533
Page 4: ...Contents Overview 4 Document 001 20559 Rev D Section G Glossary 385 Index 401 ...
Page 16: ...Contents Overview 16 Document 001 20559 Rev D ...
Page 24: ...24 Document 001 20559 Rev D Section A Overview ...
Page 30: ...30 Document 001 20559 Rev D Pin Information ...
Page 54: ...54 Document 001 20559 Rev D Supervisory ROM SROM ...
Page 60: ...60 Document 001 20559 Rev D RAM Paging ...
Page 68: ...68 Document 001 20559 Rev D Interrupt Controller ...
Page 76: ...12 Document 001 20559 Rev D General Purpose IO GPIO ...
Page 82: ...18 Document 001 20559 Rev D Internal Main Oscillator IMO ...
Page 84: ...20 Document 001 20559 Rev D Internal Low Speed Oscillator ILO ...
Page 90: ...26 Document 001 20559 Rev D External Crystal Oscillator ECO ...
Page 94: ...30 Document 001 20559 Rev D Phase Locked Loop PLL ...
Page 106: ...42 Document 001 20559 Rev D Sleep and Watchdog ...
Page 228: ...164 Document 001 20559 Rev D Section D Digital System ...
Page 234: ...170 Document 001 20559 Rev D Array Digital Interconnect ADI ...
Page 278: ...214 Document 001 20559 Rev D Digital Blocks ...
Page 296: ...232 Document 001 20559 Rev D Analog Interface ...
Page 304: ...240 Document 001 20559 Rev D Analog Array ...
Page 308: ...244 Document 001 20559 Rev D Analog Input Configuration ...
Page 312: ...248 Document 001 20559 Rev D Analog Reference ...
Page 338: ...274 Document 001 20559 Rev D Section F System Resources ...
Page 354: ...290 Document 001 20559 Rev D Multiply Accumulate MAC ...
Page 374: ...310 Document 001 20559 Rev D I2C ...
Page 400: ...336 Document 001 20559 Rev D Section G Glossary ...