AT32UC3C2512C Automotive Atmel Corporation, AT32UC3C2512C Automotive Datasheet - Page 739

no-image

AT32UC3C2512C Automotive

Manufacturer Part Number
AT32UC3C2512C Automotive
Description
Manufacturer
Atmel Corporation
Figure 28-11. Slave Receiver with Multiple Data Bytes
28.8.5
28.8.6
9166C–AVR-08/11
TCOMP
RXR DY
TWD
Interactive ACKing Received Data Bytes
Using the Peripheral DMA Controller
S
DADR
slave to pull it down in order to generate the acknowledge. The master polls the data line during
this clock pulse.
The SR.RXRDY bit indicates that a data byte is available in the RHR. The RXRDY bit is also
used as Receive Ready for the Peripheral DMA Controller receive channel.
Figure 28-10. Slave Receiver with One Data Byte
When implementing a register interface over TWI, it may sometimes be necessary or just useful
to report reads and writes to invalid register addresses by sending a NAK to the host. To be able
to do this, one must first receive the register address from the TWI bus, and then tell the TWIS
whether to ACK or NAK it. In normal operation of the TWIS, this is not possible because the con-
troller will automatically ACK the byte at about the same time as the RXRDY bit changes from
zero to one. Writing a one to the Stretch on Data Byte Received bit (CR.SODR) will stretch the
clock allowing the user to update CR.ACK bit before returning the desired value. After the last bit
in the data byte is received, the TWI bus clock is stretched, the received data byte is transferred
to the RHR register, and SR.BTF is set. At this time, the user can examine the received byte and
write the desired ACK or NACK value to CR.ACK. When the user clears SR.BTF, the desired
ACK value is transferred on the TWI bus. This makes it possible to look at the byte received,
determine if it is valid, and then decide to ACK or NAK it.
The use of the Peripheral DMA Controller significantly reduces the CPU load. The user can set
up ring buffers for the Peripheral DMA Controller, containing data to transmit or free buffer space
to place received data. By initializing NBYTES to zero before a transfer, and writing a one to
CR.CUP, NBYTES is incremented by one each time a data has been transmitted or received.
This allows the user to detect how much data was actually transferred by the DMA system.
W
A
DATA n
TCOMP
RXR DY
TWD
A
S
Read RHR
DATA n
DATA (n+1)
DADR
A
DATA (n+1)
Read RHR
W
DAT A (n+m)-1
A
DATA
DAT A (n+m)-1
A
Read RHR
DATA (n+m)
Read RHR
A
P
AT32UC3C
A
DATA (n+m)
Read RHR
P
739

Related parts for AT32UC3C2512C Automotive