English
Language : 

SAM4L Datasheet, PDF (721/1185 Pages) ATMEL Corporation – ATSAM ARM-based Flash MCU
ATSAM4L4/L2
27.9.4 Command Register
Name:
CMDR
Access Type:
Read/Write
Offset:
0x0C
Reset Value:
0x00000000
31
30
29
28
27
26
25
24
-
HSMCODE
-
HS
ACKLAST
PECEN
23
22
21
20
19
18
17
16
NBYTES
15
VALID
14
STOP
13
START
12
REPSAME
11
TENBIT
10
9
8
SADR[9:7]
7
6
5
4
3
2
1
0
SADR[6:0]
READ
• HSMCODE: HS-mode Master Code
3-bit code to be prefixed with 0b00001 to form a unique 8-bit HS-mode master code (0000 1XXX).
• HS: HS-mode
0: Causes the TWIM not to initiate HS-mode transfer.
1: Causes the TWIM to initiate HS-mode transfer.
• ACKLAST: ACK Last Master RX Byte
0: Causes the last byte in master receive mode (when NBYTES has reached 0) to be NACKed. This is the standard way of
ending a master receiver transfer.
1: Causes the last byte in master receive mode (when NBYTES has reached 0) to be ACKed. Used for performing linked
transfers in master receiver mode with no STOP or REPEATED START between the subtransfers. This is needed when more
than 255 bytes are to be received in one single transmission.
• PECEN: Packet Error Checking Enable
0: Causes the transfer not to use PEC byte verification. The PEC LFSR is still updated for every bit transmitted or received. Must
be used if SMBus mode is disabled.
1: Causes the transfer to use PEC. PEC byte generation (if master transmitter) or PEC byte verification (if master receiver) will
be performed.
• NBYTES: Number of Data Bytes in Transfer
The number of data bytes in the transfer. After the specified number of bytes have been transferred, a STOP condition is
transmitted if CMDR.STOP is one. In SMBus mode, if PEC is used, NBYTES includes the PEC byte, i.e. there are NBYTES-1
data bytes and a PEC byte.
• VALID: CMDR Valid
0: Indicates that CMDR does not contain a valid command.
1: Indicates that CMDR contains a valid command. This bit is cleared when the command is finished.
• STOP: Send STOP Condition
0: Do not transmit a STOP condition after the data bytes have been transmitted.
1: Transmit a STOP condition after the data bytes have been transmitted.
• START: Send START Condition
0: The transfer in CMDR should not commence with a START or REPEATED START condition.
42023C–SAM–02/2013
721