SWCU193 April 2023 CC2340R2 , CC2340R5 , CC2340R5-Q1
Table 20-2 lists the memory-mapped registers for the SPI registers. All register offset addresses not listed in Table 20-2 should be considered as reserved locations and the register contents should not be modified.
Offset | Acronym | Register Name | Section |
---|---|---|---|
0h | DESC | Module Description | Go |
44h | IMASK | Interrupt mask | Go |
48h | RIS | Raw interrupt status | Go |
4Ch | MIS | Masked interrupt status | Go |
50h | ISET | Interrupt set | Go |
54h | ICLR | Interrupt clear | Go |
58h | IMSET | Interrupt mask set | Go |
5Ch | IMCLR | Interrupt mask clear | Go |
60h | EMU | Emulation | Go |
100h | CTL0 | Control 0 | Go |
104h | CTL1 | Control 1 | Go |
108h | CLKCFG0 | Clock configuration 0 | Go |
10Ch | CLKCFG1 | Clock configuration 1 | Go |
110h | IFLS | Interrupt FIFO Level Select | Go |
114h | DMACR | DMA control | Go |
118h | RXCRC | Receive CRC | Go |
11Ch | TXCRC | Transmit CRC | Go |
120h | TXFHDR32 | Header write for 32bits | Go |
124h | TXFHDR24 | Header write for 24bits | Go |
128h | TXFHDR16 | Header write for 16bits | Go |
12Ch | TXFHDR8 | Header write for 8bits | Go |
130h | TXFHDRC | Atomic header control | Go |
140h | RXDATA | Receive data | Go |
150h | TXDATA | Transmit data | Go |
160h | STA | Status | Go |
Complex bit access types are encoded to fit into small table cells. Table 20-3 shows the codes that are used for access types in this section.
Access Type | Code | Description |
---|---|---|
Read Type | ||
R | R | Read |
Write Type | ||
W | W | Write |
Reset or Default Value | ||
-n | Value after reset or the default value |
DESC is shown in Table 20-4.
Return to the Summary Table.
Description Register. This register provides IP module ID, revision information, instance index and standard MMR registers offset.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-16 | MODID | R/W | 604Dh | Module identifier used to uniquely identify this IP. |
15-12 | STDIPOFF | R/W | 1h | Standard IP MMR block offset. Standard IP MMRs are the set of from aggregated IRQ registers till DTB. 0: Standard IP MMRs do not exist 0x1-0xF: Standard IP MMRs begin at offset of (64*STDIPOFF from the base IP address) |
11-8 | INSTIDX | R/W | 0h | IP Instance ID number. If multiple instances of IP exist in the device, this field can identify the instance number (0-15). |
7-4 | MAJREV | R/W | 1h | Major revision of IP (0-15). |
3-0 | MINREV | R/W | 0h | Minor revision of IP (0-15). |
IMASK is shown in Table 20-5.
Return to the Summary Table.
Interrupt mask. This register selects interrupt sources which are allowed to pass from RIS to MIS when the corresponding bit-fields are set to 1.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-9 | RESERVED | R | 0h | Reserved |
8 | DMATX | R/W | 0h | DMA Done TX event mask.
0h = Clear Interrupt Mask 1h = Set Interrrupt Mask |
7 | DMARX | R/W | 0h | DMA Done RX event mask.
0h = Clear Interrupt Mask 1h = Set Interrrupt Mask |
6 | IDLE | R/W | 0h | SPI Idle event mask.
0h = Clear Interrupt Mask 1h = Set Interrrupt Mask |
5 | TXEMPTY | R/W | 0h | Transmit FIFO Empty event mask.
0h = Clear Interrupt Mask 1h = Set Interrrupt Mask |
4 | TX | R/W | 0h | Transmit FIFO event mask.
0h = Clear Interrupt Mask 1h = Set Interrrupt Mask |
3 | RX | R/W | 0h | Receive FIFO event.
0h = Clear Interrupt Mask 1h = Set Interrrupt Mask |
2 | RTOUT | R/W | 0h | SPI Receive Time-Out event mask.
0h = Clear Interrupt Mask 1h = Set Interrrupt Mask |
1 | PER | R/W | 0h | Parity error event mask.
0h = Clear Interrupt Mask 1h = Set Interrrupt Mask |
0 | RXOVF | R/W | 0h | RXFIFO overflow event mask.
0h = Clear Interrupt Mask 1h = Set Interrrupt Mask |
RIS is shown in Table 20-6.
Return to the Summary Table.
Raw interrupt status. This register reflects the state of all pending interrupts, regardless of masking. This register allows the user to implement a poll scheme. A flag set in this register can be cleared by writing 1 to the corresponding ICLR register bit.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-9 | RESERVED | R | 0h | Reserved |
8 | DMATX | R/W | 0h | DMA Done event for TX. This interrupt is set if the TX DMA channel sends the DONE signal. This allows the handling of the TX DMA event inside SPI.
0h = Interrupt did not occur 1h = Interrupt occurred |
7 | DMARX | R/W | 0h | DMA Done event for RX. This interrupt is set if the RX DMA channel sends the DONE signal. This allows handling of the DMA RX event inside SPI.
0h = Interrupt did not occur 1h = Interrupt occurred |
6 | IDLE | R/W | 0h | SPI has completed transfers and moved to IDLE mode. This bit is set when STA.BUSY goes low.
0h = Interrupt did not occur 1h = Interrupt occurred |
5 | TXEMPTY | R/W | 0h | Transmit FIFO Empty interrupt mask. This interrupt is set when all data in the Transmit FIFO has been moved to the shift register.
0h = Interrupt did not occur 1h = Interrupt occurred |
4 | TX | R/W | 0h | Transmit FIFO event. This interrupt is set if the selected Transmit FIFO level has been reached.
0h = Interrupt did not occur 1h = Interrupt occurred |
3 | RX | R/W | 0h | Receive FIFO event. This interrupt is set if the selected Receive FIFO level has been reached
0h = Interrupt did not occur 1h = Interrupt occurred |
2 | RTOUT | R/W | 0h | SPI Receive Time-Out event. This interrupt is set if no activity is detected on the input clock line within the time period dictated by CTL1.RTOUT value. This is applicable only in peripheral mode.
0h = Interrupt did not occur 1h = Interrupt occurred |
1 | PER | R/W | 0h | Parity error event. This bit is set if a Parity error has been detected
0h = Interrupt did not occur 1h = Interrupt occurred |
0 | RXOVF | R/W | 0h | RXFIFO overflow event. This interrupt is set if an RX FIFO overflow has been detected.
0h = Interrupt did not occur 1h = Interrupt occurred |
MIS is shown in Table 20-7.
Return to the Summary Table.
Masked interrupt status. This register is simply a bitwise AND of the contents of IMASK and RIS registers. A flag set in this register can be cleared by writing 1 to the corresponding ICLR register bit.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-9 | RESERVED | R | 0h | Reserved |
8 | DMATX | R/W | 0h | Masked DMA Done event for TX.
0h = Interrupt did not occur 1h = Interrupt occurred |
7 | DMARX | R/W | 0h | Masked DMA Done event for RX.
0h = Interrupt did not occur 1h = Interrupt occurred |
6 | IDLE | R/W | 0h | Masked SPI IDLE event.
0h = Interrupt did not occur 1h = Interrupt occurred |
5 | TXEMPTY | R/W | 0h | Masked Transmit FIFO Empty event.
0h = Interrupt did not occur 1h = Interrupt occurred |
4 | TX | R/W | 0h | Masked Transmit FIFO event.
0h = Interrupt did not occur 1h = Interrupt occurred |
3 | RX | R/W | 0h | Masked receive FIFO event.
0h = Interrupt did not occur 1h = Interrupt occurred |
2 | RTOUT | R/W | 0h | Masked SPI Receive Time-Out event.
0h = Interrupt did not occur 1h = Interrupt occurred |
1 | PER | R/W | 0h | Masked Parity error event.
0h = Interrupt did not occur 1h = Interrupt occurred |
0 | RXOVF | R/W | 0h | Masked RXFIFO overflow event.
0h = Interrupt did not occur 1h = Interrupt occurred |
ISET is shown in Table 20-8.
Return to the Summary Table.
Interrupt set register. This register can used by software for diagnostics and safety checking purposes. Writing a 1 to a bit in this register will set the event and the corresponding RIS bit also gets set. If the corresponding IMASK bit is set, then the corresponding MIS register bit also gets set.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-9 | RESERVED | R | 0h | Reserved |
8 | DMATX | R/W | 0h | Set DMA Done event for TX.
0h = Writing 0 has no effect 1h = Set Interrupt |
7 | DMARX | R/W | 0h | Set DMA Done event for RX.
0h = Writing 0 has no effect 1h = Set Interrupt |
6 | IDLE | R/W | 0h | Set SPI IDLE event.
0h = Writing 0 has no effect 1h = Set Interrupt |
5 | TXEMPTY | R/W | 0h | Set Transmit FIFO Empty event.
0h = Writing 0 has no effect 1h = Set Interrupt |
4 | TX | R/W | 0h | Set Transmit FIFO event.
0h = Writing 0 has no effect 1h = Set Interrupt |
3 | RX | R/W | 0h | Set Receive FIFO event.
0h = Writing 0 has no effect 1h = Set Interrupt |
2 | RTOUT | R/W | 0h | Set SPI Receive Time-Out Event.
0h = Writing 0 has no effect 1h = Set Interrrupt Mask |
1 | PER | R/W | 0h | Set Parity error event.
0h = Writing 0 has no effect 1h = Set Interrupt |
0 | RXOVF | R/W | 0h | Set RXFIFO overflow event.
0h = Writing 0 has no effect 1h = Set Interrupt |
ICLR is shown in Table 20-9.
Return to the Summary Table.
Interrupt clear register. This register allows software to clear interrupts. Writing a 1 to a bit in this register will clear the event and the corresponding RIS bit also gets cleared. If the corresponding IMASK bit is set, then the corresponding MIS register bit also gets cleared.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-9 | RESERVED | R | 0h | Reserved |
8 | DMATX | R/W | 0h | Clear DMA Done event for TX.
0h = Writing 0 has no effect 1h = Clear Interrupt |
7 | DMARX | R/W | 0h | Clear DMA Done event for RX.
0h = Writing 0 has no effect 1h = Clear Interrupt |
6 | IDLE | R/W | 0h | Clear SPI IDLE event.
0h = Writing 0 has no effect 1h = Clear Interrupt |
5 | TXEMPTY | R/W | 0h | Clear Transmit FIFO Empty event.
0h = Writing 0 has no effect 1h = Clear Interrupt |
4 | TX | R/W | 0h | Clear Transmit FIFO event.
0h = Writing 0 has no effect 1h = Clear Interrupt |
3 | RX | R/W | 0h | Clear Receive FIFO event.
0h = Writing 0 has no effect 1h = Clear Interrupt |
2 | RTOUT | R/W | 0h | Clear SPI Receive Time-Out Event.
0h = Writing 0 has no effect 1h = Set Interrrupt Mask |
1 | PER | R/W | 0h | Clear Parity error event.
0h = Writing 0 has no effect 1h = Clear Interrupt |
0 | RXOVF | R/W | 0h | Clear RXFIFO overflow event.
0h = Writing 0 has no effect 1h = Clear Interrupt |
IMSET is shown in Table 20-10.
Return to the Summary Table.
Interrupt mask set register. Writing a 1 to a bit in this register will set the corresponding IMASK bit.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-9 | RESERVED | R | 0h | Reserved |
8 | DMATX | R/W | 0h | Set DMA Done for TX event mask
0h = Writing 0 has no effect 1h = Set interrupt mask |
7 | DMARX | R/W | 0h | Set DMA Done for RX event mask
0h = Writing 0 has no effect 1h = Set interrupt mask |
6 | IDLE | R/W | 0h | Set SPI IDLE event mask
0h = Writing 0 has no effect 1h = Set interrupt mask |
5 | TXEMPTY | R/W | 0h | Set Transmit FIFO Empty event mask
0h = Writing 0 has no effect 1h = Set interrupt mask |
4 | TX | R/W | 0h | Set Transmit FIFO event mask
0h = Writing 0 has no effect 1h = Set interrupt mask |
3 | RX | R/W | 0h | Set Receive FIFO event mask
0h = Writing 0 has no effect 1h = Set interrupt mask |
2 | RTOUT | R/W | 0h | Set SPI Receive Time-Out event mask
0h = Writing 0 has no effect 1h = Set interrupt mask |
1 | PER | R/W | 0h | Set Parity error event mask
0h = Writing 0 has no effect 1h = Set interrupt mask |
0 | RXOVF | R/W | 0h | Set RXFIFO overflow event mask
0h = Writing 0 has no effect 1h = Set interrupt mask |
IMCLR is shown in Table 20-11.
Return to the Summary Table.
Interrupt mask clear register. Writing a 1 to a bit in this register will clear the corresponding IMASK bit.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-9 | RESERVED | R | 0h | Reserved |
8 | DMATX | R/W | 0h | Clear DMA Done for TX event mask
0h = Writing 0 has no effect 1h = Clear interrupt mask |
7 | DMARX | R/W | 0h | Clear DMA Done for RX event mask
0h = Writing 0 has no effect 1h = Clear interrupt mask |
6 | IDLE | R/W | 0h | Clear SPI IDLE event mask
0h = Writing 0 has no effect 1h = Clear interrupt mask |
5 | TXEMPTY | R/W | 0h | Clear Transmit FIFO Empty event mask
0h = Writing 0 has no effect 1h = Clear interrupt mask |
4 | TX | R/W | 0h | Clear Transmit FIFO event mask
0h = Writing 0 has no effect 1h = Clear interrupt mask |
3 | RX | R/W | 0h | Clear Receive FIFO event mask
0h = Writing 0 has no effect 1h = Clear interrupt mask |
2 | RTOUT | R/W | 0h | Clear SPI Receive Time-Out event mask
0h = Writing 0 has no effect 1h = Clear interrupt mask |
1 | PER | R/W | 0h | Clear Parity error event mask
0h = Writing 0 has no effect 1h = Clear interrupt mask |
0 | RXOVF | R/W | 0h | Clear RXFIFO overflow event mask
0h = Writing 0 has no effect 1h = Clear interrupt mask |
EMU is shown in Table 20-12.
Return to the Summary Table.
Emulation control register. This register controls the behavior of the IP related to core halted input.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-1 | RESERVED | R | 0h | Reserved |
0 | HALT | R/W | 0h | Halt control
0h = Free run option. The IP ignores the state of the core halted input. 1h = Freeze option. The IP freezes functionality when the core halted input is asserted, and resumes when it is deasserted. The freeze can either be immediate or after the IP has reached a boundary (end of word boundary, based on DSS configuration) from where it can resume without corruption. |
CTL0 is shown in Table 20-13.
Return to the Summary Table.
SPI control register 0
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-18 | RESERVED | R | 0h | Reserved |
17 | IDLEPOCI | R/W | 0h | The Idle value of POCI - when TXFIFO is empty and before data is written into TXFIFO - can be controlled by this field.
0h = POCI output idle value of '0' 1h = POCI outputs idle value of '1' |
16 | GPCRCEN | R/W | 0h | General purpose CRC enable. This bit enables transmit side CRC unit for general purpose use by software when SPI is disabled (CTL1.EN = 0). This bit must be 0 when SPI is enabled.
0h = Transmit side CRC unit is not available for general purpose software use 1h = Transmit side CRC unit is available for general purpose software use |
15 | CRCPOLY | R/W | 0h | CRC polynomial selection.
0h = Selects 8-bit CCITT CRC polynomial 1h = Selects 16-bit CCITT CRC polynomial |
14 | AUTOCRC | R/W | 0h | Auto insert CRC
0h = Do not insert CRC into TXFIFO upon TXFIFO underflow 1h = Insert CRC into TXFIFO upon TXFIFO underflow |
13 | CRCEND | R/W | 0h | CRC16 Endianness
0h = Auto-insertion of CRC16 is most-significant byte first 1h = Auto-insertion of CRC16 is least-significant byte first |
12 | CSCLR | R/W | 0h | Clear shift register counter on CS inactive. This bit is relevant only in the peripheral mode, when CTL1.MS=0. 0h = Disable automatic clear of shift register when CS goes inactive. 1h = Enable automatic clear of shift register when CS goes inactive. |
11 | FIFORST | R/W | 0h | This bit is used to reset transmit and receive FIFO pointers. This bit is auto cleared once the FIFO pointer reset operation is completed.
0h = FIFO pointers reset completed when 0 is read 1h = Trigger FIFO pointers reset when written to 1. |
10 | HWCSN | R/W | 0h | Hardware controlled chip select (CS) value. When set CS is zero till TX FIFO is empty, as in - a. CS is de-asserted b. All data bytes are transmitted c. CS is asserted 0h = HWCSN Disable 1h = HWCSN Enable |
9 | SPH | R/W | 0h | SCLK phase (Motorola SPI frame format only). This bit selects the clock edge that captures data and enables it to change state. It has the most impact on the first bit transmitted by either permitting or not permitting a clock transition before the first data capture clock edge. 0h = Data is captured on the first clock edge transition. 1h = Data is captured on the second clock edge transition. |
8 | SPO | R/W | 0h | SCLK polarity (Motorola SPI frame format only).
0h = SPI produces a steady state LO value on the SCLK 1h = SPI produces a steady state HI value on the SCLK |
7 | RESERVED | R | 0h | Reserved |
6-5 | FRF | R/W | 0h | Frame format select
0h = Motorola SPI frame format (3-wire mode) 1h = Motorola SPI frame format (4-wire mode) 2h = TI synchronous serial frame format 3h = MICROWIRE frame format |
4 | RESERVED | R | 0h | Reserved |
3-0 | DSS | R/W | 0h | Data size select. The applicable DSS values for controller mode operation are 0x3 to 0xF and for peripheral mode operation are 0x6 to 0xF. DSS values 0x0 to 0x2 are reserved and must not be used.
3h = 4-bits data size 4h = 5-bits data size 5h = 6-bits data size 6h = 7-bits data size 7h = 8-bits data size 8h = 9-bits data size 9h = 10-bits data size Ah = 11-bits data size Bh = 12-bits data size Ch = 13-bits data size Dh = 14-bits data size Eh = 15-bits data size Fh = 16-bits data size |
CTL1 is shown in Table 20-14.
Return to the Summary Table.
SPI control register 1
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-30 | RESERVED | R | 0h | Reserved |
29-24 | RTOUT | R/W | 0h | Receive Timeout (only for Peripheral mode) Defines the number of CLKSVT clock cycles after which the Receive Timeout flag RIS.RTOUT is set. A value of 0 disables this function. |
23-16 | REPTX | R/W | 0h | Counter to repeat last transfer (only in controller mode) 0: repeat last transfer is disabled. x: repeat the last transfer with the provided value. The transfer will be started with writing a data into the TX FIFO. Sending the data will be repeated REPTX number of times, so the data will be transferred x+1 times in total. It can be used to clean a transfer or to pull a certain amount of data by a peripheral. |
15-12 | CDMODE | R/W | 0h | Commnd Data Mode. This bit field value determines the behavior of C/D or CS signal when CDEN = 1. CS pin held low indicates command phase and CS pin held high indicates data phase. When CDMODE = 0x0, the CS pin is always held high during transfer indicating data phase only operation (manual mode). When CDMODE = 0xF, the CS pin is always held low during transfer indicating command phase only operation (manual mode). When CDMODE = 0x1 to 0xE, the CS pin is held low for the number of bytes indicated by CDMODE value for the command phase and held high for the remaining transfers in the data phase (automatic mode). When CDMODE is set to value 0x1 to 0xE, reading CDMODE during operation indicates the remaining bytes to be transferred in the command phase. 0h = Manual mode: Data Fh = Manual mode: Command |
11 | CDEN | R/W | 0h | Command/Data mode enable. This feature is applicable only in controller mode and for 8-bit transfers (CTL0.DSS = 7). The chip select pin is used for command/data signaling in Motorola SPI frame format (3-wire) operation.
0h = C/D Mode Disable 1h = C/D Mode Enable |
10-8 | RESERVED | R | 0h | Reserved |
7 | PBS | R/W | 0h | Parity bit select
0h = Bit 0 is used for Parity 1h = Bit 1 is used for Parity, Bit 0 is ignored |
6 | PES | R/W | 0h | Even parity select.
0h = Odd Parity mode 1h = Even Parity mode |
5 | PEN | R/W | 0h | Parity enable. If enabled the last bit will be used as parity to evaluate the correct reception of the previous bits. In case of parity mismatch the parity error flag RIS.PER will be set. This feature is available only in SPI controller mode. 0h = Disable Parity function 1h = Enable Parity function |
4 | MSB | R/W | 0h | MSB first select. Controls the direction of receive and transmit shift register. MSB first configuration (MSB = 1) must be selected when CRC feature is used for SPI communication.
0h = LSB first 1h = MSB first |
3 | POD | R/W | 0h | Peripheral data output disable. This bit is relevant only in the peripheral mode, MS=1. In multiple-peripheral systems, it is possible for a SPI controller to broadcast a message to all peripherals in the system while ensuring that only one peripheral drives data onto its serial output line. In such systems the POCI lines from multiple peripherals could be tied together. To operate in such systems, this bit field can be set if the SPI peripheral is not supposed to drive the POCI output. 0h = SPI can drive the POCI output in peripheral mode. 1h = SPI cannot drive the POCI output in peripheral mode. |
2 | MS | R/W | 1h | Controller or peripheral mode select. This bit can be modified only when SPI is disabled, CTL1.EN=0.
0h = Select Peripheral mode 1h = Select Controller mode |
1 | LBM | R/W | 0h | Loop back mode control
0h = Disable loopback mode. Normal serial port operation enabled. 1h = Enable loopback mode. Output of transmit serial shifter is connected to input of receive serial shifter internally. |
0 | EN | R/W | 0h | SPI enable. NOTE: This bit field must be set to 1 using a separate write access, after the other bit fields have been configured. 0h = SPI is disabled 1h = SPI Enabled and released for operation. |
CLKCFG0 is shown in Table 20-15.
Return to the Summary Table.
Clock configuration register 0. This register is used to configure the clock prescaler.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-3 | RESERVED | R | 0h | Reserved |
2-0 | PRESC | R/W | 0h | Prescaler configuration
0h = Do not divide clock source 1h = Divide clock source by 2 2h = Divide clock source by 3 3h = Divide clock source by 4 4h = Divide clock source by 5 5h = Divide clock source by 6 6h = Divide clock source by 7 7h = Divide clock source by 8 |
CLKCFG1 is shown in Table 20-16.
Return to the Summary Table.
Clock configuration register 1. This register is used to configure serial clock rate and clock count for delayed sampling in controller mode.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-20 | RESERVED | R | 0h | Reserved |
19-16 | DSAMPLE | R/W | 0h | Delayed sampling. In controller mode the data on the POCI pin will be delayed sampled by the defined CLKSVT clock cycles. DSAMPLE values can range from 0 to SCR+1. Typically, values of 1 or 2 would suffice. |
15-10 | RESERVED | R | 0h | Reserved |
9-0 | SCR | R/W | 0h | Serial clock divider. This is used to generate the transmit and receive bit rate of the SPI. The SPI bit rate: (SPI functional clock frequency)/((SCR+1)*2). SCR value can be from 0 to 1023. |
IFLS is shown in Table 20-17.
Return to the Summary Table.
Interrupt FIFO level select register. This register can be used to define the levels at which the RIS.TX, RIS.RX flags are triggered. The interrupts are generated based on FIFO level. Out of reset, the IFLS.TXSEL and IFLS.RXSEL bits are configured so that the FIFOs trigger an interrupt at the half-way mark.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-11 | RESERVED | R | 0h | Reserved |
10-8 | RXSEL | R/W | 2h | Receive FIFO Level Select. The trigger points for the receive interrupt are as follows:
0h = Reserved 1h = RX FIFO >= 1/4 full 2h = RX FIFO >= 1/2 full (default) 3h = RX FIFO >= 3/4 full 4h = Reserved 5h = RX FIFO is full 6h = Reserved 7h = Trigger when RX FIFO contains >= 1 byte |
7-3 | RESERVED | R | 0h | Reserved |
2-0 | TXSEL | R/W | 2h | Transmit FIFO Level Select. The trigger points for the transmit interrupt are as follows:
0h = Reserved 1h = TX FIFO <= 3/4 empty 2h = TX FIFO <= 1/2 empty (default) 3h = TX FIFO <= 1/4 empty 4h = Reserved 5h = TX FIFO is empty 6h = Reserved 7h = Trigger when TX FIFO has >= 1 byte free |
DMACR is shown in Table 20-18.
Return to the Summary Table.
uDMA Control Register
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-9 | RESERVED | R | 0h | Reserved |
8 | TXEN | R/W | 0h | Transmit DMA enable. If this bit is set to 1, DMA for the trasmit FIFO is enabled.
0h = Disable TX DMA 1h = Enable TX DMA |
7-1 | RESERVED | R | 0h | Reserved |
0 | RXEN | R/W | 0h | Receive DMA enable. If this bit is set to 1, DMA for the receive FIFO is enabled.
0h = Disable RX DMA 1h = Enable RX DMA |
RXCRC is shown in Table 20-19.
Return to the Summary Table.
Receive CRC register. Reading this register provides the computed CRC value from the receive side CRC unit. Reading this register or writing to this register with any value auto initializes the seed. The seed value is 0xFF when CTL0.CRCPOLY = 0 and 0xFFFF when CTL0.CRCPOLY = 1 for CCITT CRC polynomials. Bits[15:8] are don't care when CTL0.CRCPOLY = 0.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-16 | RESERVED | R | 0h | Reserved |
15-0 | DATA | R/W | 0h | CRC value SW should read RXCRC register at the end of data transmission to reinitiaze the seed value to all ones |
TXCRC is shown in Table 20-20.
Return to the Summary Table.
Transmit CRC register. Reading this register provides the computed CRC value from the transmit side CRC unit. Reading this register or writing to this register with any value auto initializes the seed. The seed value is 0xFF when CTL0.CRCPOLY = 0 and 0xFFFF when CTL0.CRCPOLY = 1 for CCITT CRC polynomials. Bits[15:8] are don't care when CTL0.CRCPOLY = 0.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31 | AUTOCRCINS | R | 0h | Status to indicate if Auto CRC has been inserted into TXFIFO. This is applicable only if CTL0.AUTOCRC enable bit is set. SW should read TXCRC register to clear auto inserted CRC at the end of the transfer. 0h = Auto CRC not yet inserted 1h = Auto CRC inserted |
30-16 | RESERVED | R | 0h | Reserved |
15-0 | DATA | R/W | 0h | CRC value |
TXFHDR32 is shown in Table 20-21.
Return to the Summary Table.
Header update reigster for 32 bits of header data into the TXFIFO.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-0 | DATA | W | 0h | This field can be used to write four bytes of header data into the TXFIFO |
TXFHDR24 is shown in Table 20-22.
Return to the Summary Table.
Header update reigster for 24 bits of header data into the TXFIFO.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-0 | DATA | W | 0h | This field can be used to write three bytes of header data into the TXFIFO. |
TXFHDR16 is shown in Table 20-23.
Return to the Summary Table.
Header update reigster for 16 bits of data into the TXFIFO.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-0 | DATA | W | 0h | This field can be used to write two bytes of header data into the TXFIFO. |
TXFHDR8 is shown in Table 20-24.
Return to the Summary Table.
Header update reigster for 8 bits of header data into the TXFIFO.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-0 | DATA | W | 0h | This field can be used to write one byte of header data into the TXFIFO. |
TXFHDRC is shown in Table 20-25.
Return to the Summary Table.
Atomic Header Control register
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-4 | RESERVED | R | 0h | Reserved |
3 | CSGATE | R/W | 0h | Chip Select Gating control register. If this bit is set, header update register writes are blocked when chip select (CS) is active low, and HDRIGN bit is set. This bit resets to 0. 0h = The first header update register write is not blocked based on CS active status (low). If no header update occurred when CS was high (inactive), the first header update is allowed when CS is low (active), and the HDRCMT bit is set. The use case is for the external controller to ensure that the SCLK is not driven during this header update. If the header is already updated when CS is high and inactive, HDRCMT is set immediately when CS drops to active low state, and header writes when CS is low are ignored even if this UNBLK bit is set. 1h = Header update register writes are blocked when CS is active (low) |
2 | HDRCMT | R/W | 0h | Header Committed field. This bit is set when the HDREN bit is set and CS is sampled low. This bit remains 0 otherwise. When set, this bit can be written to a value of 0 to clear.
0h = Header update is not committed 1h = Header update is committed |
1 | HDRIGN | R/W | 0h | Header Ignored field. When CSGATE is set to BLK, this bit is set when the last Header update register TXFHDRn is written when CS is low or HDRCMT is already set. When CSGATE is set to UNBLK, this bit is set only when the header update register is written when HDRCMT is already set. This bit remains 0 otherwise. When set, this bit can be written to a value of 0 to clear.
0h = Header update is not ignored 1h = Header update is ignored |
0 | HDREN | R/W | 0h | Header enable field. When CSGATE is set to BLK, this bit has to be set by software to enable atomic header feature. When CSGATE is set to UNBLK, this field is set automatically whenever a write to header update registers TXFHDRn occurs.
0h = Atomic header update feature disable 1h = Atomic header update feature enable |
RXDATA is shown in Table 20-26.
Return to the Summary Table.
RXDATA Register. Reading this register returns first value in the RX FIFO. If the FIFO is empty the last read value is returned. Writing has no effect and is ignored.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-16 | RESERVED | R | 0h | Reserved |
15-0 | DATA | R | 0h | Received Data. When read, the entry in the receive FIFO, pointed to by the current FIFO read pointer is accessed. As data values are read by the receive logic from the incoming data frame, they are placed into the entry in the receive FIFO, pointed to by the current RX FIFO write pointer. Received data less than 16 bits is automatically right-justified in the receive buffer. |
TXDATA is shown in Table 20-27.
Return to the Summary Table.
TXDATA Register. Writing a value in this register puts the data into the TX FIFO. Reading this register returns the last writen value.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-16 | RESERVED | R | 0h | Reserved |
15-0 | DATA | R/W | 0h | Transmit Data. When read, the last entry in the transmit FIFO, pointed to by the current FIFO write pointer is accessed. When written, the entry in the TX FIFO pointed to by the write pointer, is written to. Data values are read from the transmit FIFO by the transmit logic. It is loaded into the transmit serial shifter, then serially shifted out onto the output pin at the programmed bit rate. When a data size of less than 16 bits is selected, the user must right-justify data written to the transmit FIFO. The transmit logic ignores the unused bits. |
STA is shown in Table 20-28.
Return to the Summary Table.
Status Register
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-14 | RESERVED | R | 0h | Reserved |
13-8 | TXFIFOLVL | R | 0h | Indicates how many locations of TXFIFO are currently filled with data |
7 | RESERVED | R | 0h | Reserved |
6 | TXDONE | R/W | 0h | Transmit done. Indicates whether the last bit has left the Shift register after a transmission
0h = Last bit has not yet left the Shift register, and the transmission is ongoing. 1h = Last bit has been shifted out, and the transmission is done |
5 | CSD | R/W | 0h | Detection of CS deassertion in the middle of a data frame transmission results in this error being set. This feature is only available in the peripheral mode.
0h = No CS posedge is detected before the entire data frame has been transmitted. 1h = An error is generated when CS posedge (deassertion) is detected before the entire data frame is transmitted. |
4 | BUSY | R | 0h | SPI Busy status
0h = SPI is in idle mode. 1h = SPI is currently transmitting and/or recieving data, or transmit FIFO is not empty. |
3 | RNF | R | 1h | Receive FIFO not full status.
0h = Receive FIFO is full. 1h = Receive FIFO is not full. |
2 | RFE | R | 1h | Receive FIFO empty status.
0h = Receive FIFO is not empty. 1h = Receive FIFO is empty. |
1 | TNF | R | 1h | Transmit FIFO not full status.
0h = Transmit FIFO is full. 1h = Transmit FIFO is not full. |
0 | TFE | R | 1h | Transmit FIFO empty status.
0h = Transmit FIFO is not empty. 1h = Transmit FIFO is empty. |