SWRU543B January 2019 – June 2025 CC3230S , CC3230SF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
Table 8-6 lists the memory-mapped registers for the SPI. All register offset addresses not listed in Table 8-6 should be considered as reserved locations, and the register contents should not be modified.
| Offset | Acronym | Register Name | Section |
|---|---|---|---|
| 10h | SPI_SYSCONFIG | System Configuration | Section 8.6.1 |
| 114h | SPI_SYSSTATUS | System Status | Section 8.6.2 |
| 118h | SPI_IRQSTATUS | Interrupt Status | Section 8.6.3 |
| 11Ch | SPI_IRQENABLE | Interrupt Enable | Section 8.6.4 |
| 128h | SPI_MODULCTRL | Module Control | Section 8.6.5 |
| 12Ch | SPI_CHCONF | Channel Configuration | Section 8.6.6 |
| 130h | SPI_CHSTAT | Channel Status | Section 8.6.7 |
| 134h | SPI_CHCTRL | Channel Control | Section 8.6.8 |
| 138h | SPI_TX | Channel Transmitter | Section 8.6.9 |
| 13Ch | SPI_RX | Channel Receiver | Section 8.6.10 |
| 17Ch | SPI_XFERLEVEL | Transfer Levels | Section 8.6.11 |
SPI_SYSCONFIG is shown in Figure 8-20 and described in Table 8-7.
Clock management configuration.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | |||||||
| R-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | |||||||
| R-0h | |||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | |||||||
| R-0h | |||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | SOFTRESET | ||||||
| R-0h | R/W-0h | ||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-1 | RESERVED | R | 0h | |
| 0 | SOFTRESET | R/W | 0h | Software reset. (Optional)
0h (W) = No action 0h (R) = Reset done, no pending action 1h (W) = Initiate software reset 1h (R) = Reset (software or other) ongoing |
SPI_SYSSTATUS is shown in Figure 8-21 and described in Table 8-8.
This register provides status information about the module excluding the interrupt status information.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | |||||||
| R-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | |||||||
| R-0h | |||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | |||||||
| R-0h | |||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | RESETDONE | ||||||
| R-0h | R-0h | ||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-1 | RESERVED | R | 0h | |
| 0 | RESETDONE | R | 0h | Internal Reset Monitoring 0h (R) = Internal module reset is on-going 1h (R) = Reset completed |
SPI_IRQSTATUS is shown in Figure 8-22 and described in Table 8-9.
The interrupt status regroups all the status of the module internal events that can generate an interrupt.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | |||||||
| R-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | EOW | WKS | |||||
| R-0h | R/W-0h | R/W-0h | |||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | |||||||
| R-0h | |||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | RX_OVERFLOW | RX_FULL | TX_UNDERFLOW | TX_EMPTY | |||
| R-0h | R/W-0h | R/W-0h | R/W-0h | R/W-0h | |||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-18 | RESERVED | R | 0h | |
| 17 | EOW | R/W | 0h | End of word count event when a channel is enabled using the FIFO buffer and the channel had sent the number of SPI word defined by SPI_XFERLEVEL[WCNT]. 0h (W) = Event status bit unchanged 0h (R) = Event false 1h (W) = Event status bit is reset 1h (R) = Event is pending |
| 16 | WKS | R/W | 0h | Wake Up event in slave mode when an active control signal is detected on the SPIEN line programmed in the field SPI_CHCONF[SPIENSLV]. 0h (W) = Event status bit unchanged 0h (R) = Event false 1h (W) = Event status bit is reset 1h (R) = Event is pending |
| 15-4 | RESERVED | R | 0h | |
| 3 | RX_OVERFLOW | R/W | 0h | Receiver register overflow (slave mode only). 0h (W) = Event status bit unchanged 0h (R) = Event false 1h (W) = Event status bit is reset 1h (R) = Event is pending |
| 2 | RX_FULL | R/W | 0h | Receiver register full or almost full. This bit indicate FIFO almost full status when built-in FIFO is use for receive register (SPI_CHCONF[FFER] is set). 0h (W) = Event status bit unchanged 0h (R) = Event false 1h (W) = Event status bit is reset 1h (R) = Event is pending |
| 1 | TX_UNDERFLOW | R/W | 0h | Transmitter register underflow. 0h (W) = Event status bit unchanged 0h (R) = Event false 1h (W) = Event status bit is reset 1h (R) = Event is pending |
| 0 | TX_EMPTY | R/W | 0h | Transmitter register empty or almost empty. This bit indicate FIFO almost full status when built-in FIFO is use for transmit register (SPI_CHCONF[FFEW] is set). 0h (W) = Event status bit unchanged 0h (R) = Event false 1h (W) = Event status bit is reset 1h (R) = Event is pending |
SPI_IRQENABLE is shown in Figure 8-23 and described in Table 8-10.
This register lets the user enable and disable the module internal sources of interrupt, on an event-by-event basis.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | |||||||
| R-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | EOWE | WKE | |||||
| R-0h | R/W-0h | R/W-0h | |||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | |||||||
| R-0h | |||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | RX_OVERFLOW_ENABLE | RX_FULL_ENABLE | TX_UNDERFLOW_ENABLE | TX_EMPTY_ENABLE | |||
| R-0h | R/W-0h | R/W-0h | R/W-0h | R/W-0h | |||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-18 | RESERVED | R | 0h | |
| 17 | EOWE | R/W | 0h | End of word count Interrupt Enable. 0h = Interrupt disabled 1h = Interrupt enabled |
| 16 | WKE | R/W | 0h | Wake-up event interrupt enable in slave mode when an active control signal is detected on the SPIEN line programmed in the field SPI_CHCONF[SPIENSLV] 0h = Interrupt disabled 1h = Interrupt enabled |
| 15-4 | RESERVED | R | 0h | |
| 3 | RX_OVERFLOW_ENABLE | R/W | 0h | Receiver register overflow interrupt enable. 0h = Interrupt disabled 1h = Interrupt enabled |
| 2 | RX_FULL_ENABLE | R/W | 0h | Receiver register full or almost full interrupt enable. 0h = Interrupt disabled 1h = Interrupt enabled |
| 1 | TX_UNDERFLOW_ENABLE | R/W | 0h | Transmitter register underflow interrupt enable. 0h = Interrupt disabled 1h = Interrupt enabled |
| 0 | TX_EMPTY_ENABLE | R/W | 0h | Transmitter register empty or almost empty interrupt enable. 0h = Interrupt disabled 1h = Interrupt enabled |
SPI_MODULCTRL is shown in Figure 8-24 and described in Table 8-11.
This register is dedicated to the configuration of the SPI.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | |||||||
| R-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | |||||||
| R-0h | |||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | |||||||
| R-0h | |||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | MS | PIN34 | SINGLE | ||||
| R-0h | R/W-1h | R/W-0h | R/W-0h | ||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-3 | RESERVED | R | 0h | |
| 2 | MS | R/W | 1h | Master/ Slave 0h = Master - The module generates the SPICLK and SPIEN 1h = Slave - The module receives the SPICLK and SPIEN |
| 1 | PIN34 | R/W | 0h | Pin mode selection: 3-wire vs 4-wire. This register is used to configure the SPI pin mode, in master or slave mode. If asserted the controller only use SIMO,SOMI and SPICLK clock pin for spi transfers. 0h = SPIEN is used as a chip select. 1h = SPIEN is not used. In this mode all related option to chip select have no meaning. |
| 0 | SINGLE | R/W | 0h | Channel enable (master mode only) 1h = Channel will be used in master mode. This bit must be set in Force SPIEN mode. |
SPI_CHCONF is shown in Figure 8-25 and described in Table 8-12.
This register is dedicated to the configuration of the channel. The following table lists the allowed data line configurations per channel. The user must program which data line to use and in which direction (receive or transmit), according to the single data pin or 2-pin interface mode shared with the external slave or master device.
| IS | DPE1 | DPE0 | TRM (Transmit and Receive) |
|---|---|---|---|
| 0 | 0 | 0 | Supported |
| 0 | 0 | 1 | Supported |
| 0 | 1 | 0 | Supported |
| 0 | 1 | 1 | Not supported (unpredictable result) |
| 1 | 0 | 0 | Supported |
| 1 | 0 | 1 | Supported |
| 1 | 1 | 0 | Supported |
| 1 | 1 | 1 | Not supported (unpredictable result) |
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | CLKG | FFER | FFEW | RESERVED | |||
| R-0h | R/W-0h | R/W-0h | R/W-0h | R-0h | |||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | FORCE | TURBO | IS | DPE1 | DPE0 | ||
| R-0h | R/W-0h | R/W-0h | R/W-1h | R/W-1h | R/W-0h | ||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| DMAR | DMARW | TRM | WL | ||||
| R/W-0h | R/W-0h | R/W-0h | R/W-0h | ||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| WL | EPOL | CLKD | POL | PHA | |||
| R/W-0h | R/W-0h | R/W-0h | R/W-0h | R/W-0h | |||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-30 | RESERVED | R | 0h | |
| 29 | CLKG | R/W | 0h | Clock divider granularity. This register defines the granularity of channel clock divider: power of two or one clock cycle granularity. When this bit is set the register SPI_CHCTRL[EXTCLK] must be configured to reach a maximum of 4096 clock divider ratio. Then the clock divider ratio is a concatenation of SPI_CHCONF[CLKD] and SPI_CHCTRL[EXTCLK] values 0h = Clock granularity of power of two 1h = One clock cycle granularity |
| 28 | FFER | R/W | 0h | FIFO enabled for receive: Only one channel can have this bit field set. 0h = The buffer is not used to receive data. 1h = The buffer is used to receive data. |
| 27 | FFEW | R/W | 0h | FIFO enabled for transmit: Only one channel can have this bit field set. 0h = The buffer is not used to transmit data. 1h = The buffer is used to transmit data. |
| 26-21 | RESERVED | R | 0h | |
| 20 | FORCE | R/W | 0h | Manual SPIEN assertion to keep SPIEN active between SPI words (single channel master mode only)
0h = Writing 0 into this bit drives low the SPIEN line when SPI_CHCONF[EPOL] = 0, and drives it high when SPI_CHCONF[EPOL] = 1. 1h = Writing 1 into this bit drives high the SPIEN line when SPI_CHCONF[EPOL] = 0, and drives it low when SPI_CHCONF[EPOL] = 1 |
| 19 | TURBO | R/W | 0h | Turbo mode 0h = Turbo is deactivated (recommended for single SPI word transfer) 1h = Turbo is activated to maximize the throughput for multi SPI words transfer. |
| 18 | IS | R/W | 1h | Input select 0h = Data Line0 (SPIDAT[0]) selected for reception. 1h = Data Line1 (SPIDAT[1]) selected for reception |
| 17 | DPE1 | R/W | 1h | Transmission enable for data line 1 0h = Data Line1 (SPIDAT[1]) selected for transmission 1h = No transmission on data line 1 (SPIDAT[1]) |
| 16 | DPE0 | R/W | 0h | Transmission enable for data line 0 0h = Data line 0 (SPIDAT[0]) selected for transmission 1h = No transmission on data line 0 (SPIDAT[0]) |
| 15 | DMAR | R/W | 0h | DMA read request. The DMA read request line is asserted when the channel is enabled and a new data is available in the receive register of the channel. The DMA read request line is deasserted on read completion of the receive register of the channel. 0h = DMA read request disabled 1h = DMA read request enabled |
| 14 | DMARW | R/W | 0h | DMA write request. The DMA write request line is asserted when The channel is enabled and the transmitter register of the channel is empty. The DMA write request line is deasserted on load completion of the transmitter register of the channel. 0h = DMA write request disabled 1h = DMA write request enabled |
| 13-12 | TRM | R/W | 0h | Transmit receive modes 0h = Transmit and receive mode |
| 11-7 | WL | R/W | 0h | SPI word length 7h = The SPI word is 8-bits long Fh = The SPI word is 16-bits long 1Fh = The SPI word is 32-bits long |
| 6 | EPOL | R/W | 0h | SPIEN polarity 0h = SPIEN is held high during the active state. 1h = SPIEN is held low during the active state. |
| 5-2 | CLKD | R/W | 0h | Frequency divider for SPICLK. (Only when the module is a master SPI device). A programmable clock divider divides the SPI reference clock (CLKSPIREF) with a 4-bit value, and results in a new clock SPICLK available to shift-in and shiftout data. 0h = 1 1h = 2 2h = 4 3h = 8 4h = 16 5h = 32 6h = 64 7h = 128 8h = 256 9h = 512 Ah = 1024 Bh = 2048 Ch = 4096 Dh = 8192 Eh = 16384 Fh = 32768 |
| 1 | POL | R/W | 0h | SPICLK polarity 0h = SPICLK is held high during the active state 1h = SPICLK is held low during the active state |
| 0 | PHA | R/W | 0h | SPICLK phase 0h = Data are latched on odd numbered edges of SPICLK. 1h = Data are latched on even numbered edges of SPICLK. |
SPI_CHSTAT is shown in Figure 8-26 and described in Table 8-13.
This register provides status information about the transmitter and receiver registers of the channel.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| RESERVED | |||||||
| R-0h | |||||||
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| RESERVED | |||||||
| R-0h | |||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| RESERVED | |||||||
| R-0h | |||||||
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RESERVED | RXFFF | RXFFE | TXFFF | TXFFE | EOT | TXS | RXS |
| R-0h | R-0h | R-0h | R-0h | R-0h | R-0h | R-0h | R-0h |
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-7 | RESERVED | R | 0h | |
| 6 | RXFFF | R | 0h | Channel FIFO receive buffer full status 0h (R) = FIFO receive buffer is not full 1h (R) = FIFO receive buffer is full |
| 5 | RXFFE | R | 0h | Channel FIFO receive buffer empty status 0h (R) = FIFO receive buffer is not empty 1h (R) = FIFO receive buffer is empty |
| 4 | TXFFF | R | 0h | Channel FIFO transmit buffer full status 0h (R) = FIFO transmit buffer is not full 1h (R) = FIFO transmit buffer is full |
| 3 | TXFFE | R | 0h | Channel FIFO transmit buffer empty status 0h (R) = FIFO transmit buffer is not empty 1h (R) = FIFO transmit buffer is empty |
| 2 | EOT | R | 0h | Channel end of transfer status. The definitions of beginning and end of transfer vary with master versus slave and the transfer format (turbo mode). See dedicated chapters for details. 0h (R) = This flag is automatically cleared when the shift register is loaded with the data from the transmitter register (beginning of transfer). 1h (R) = This flag is automatically set to one at the end of a SPI transfer. |
| 1 | TXS | R | 0h | Channel transmitter register status 0h (R) = Register is full 1h (R) = Register is empty |
| 0 | RXS | R | 0h | Channel receiver register status 0h (R) = Register is empty 1h (R) = Register is full |
SPI_CHCTRL is shown in Figure 8-27 and described in Table 8-14.
This register enables the channel and defines the extended clock ratio with one clock cycle granularity.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | ||
| RESERVED | |||||||||||||||||
| R-0h | |||||||||||||||||
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ||
| EXTCLK | RESERVED | EN | |||||||||||||||
| R/W-0h | R-0h | R/W-0h | |||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-16 | RESERVED | R | 0h | |
| 15-8 | EXTCLK | R/W | 0h | Clock ratio extension This register is used to concatenate with the SPI_CHCONF[CLKD] register for the clock ratio only when the granularity is one clock cycle (SPI_CHCONF[CLKG] set to 1). Then, the max value reached is 4096 clock divider ratio. 0h = Clock ratio is CLKD + 1 1h = Clock ratio is CLKD + 1 + 16 FFh = Clock ratio is CLKD + 1 + 4080 |
| 7-1 | RESERVED | R | 0h | |
| 0 | EN | R/W | 0h | Channel enable 0h = Channel is not active 1h = Channel is active |
SPI_TX is shown in Figure 8-28 and described in Table 8-15.
This register contains a single SPI word to transmit on the serial link, depending on SPI word length. See Chapter Access to data registers for the list of supported accesses; the little-endian host accesses the SPI 8-bit word on 0x00, while the big-endian host accesses it on 0x03.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| TDATA | |||||||||||||||||||||||||||||||
| R/W-0h | |||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-0 | TDATA | R/W | 0h | Channel data to transmit |
SPI_RX is shown in Figure 8-29 and described in Table 8-16.
This register contains a single SPI word received through the serial link, depending on SPI word length. See Chapter Access to data registers for the list of supported accesses; the little-endian host accesses the SPI 8-bit word on 0x00, while the big-endian host accesses it on 0x03.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| RDATA | |||||||||||||||||||||||||||||||
| R-0h | |||||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-0 | RDATA | R | 0h | Channel data received |
SPI_XFERLEVEL is shown in Figure 8-30 and described in Table 8-17.
This register provides the transfer levels required to use the FIFO buffer during transfer.
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| WCNT | AFL | AEL | |||||||||||||||||||||||||||||
| R/W-0h | R/W-0h | R/W-0h | |||||||||||||||||||||||||||||
| LEGEND: R/W = Read/Write; R = Read only; W1toCl = Write 1 to clear bit; -n = value after reset |
| Bit | Field | Type | Reset | Description |
|---|---|---|---|---|
| 31-16 | WCNT | R/W | 0h | SPI word counter. This register holds the programmable value of the number of SPI words to be transferred on the channel using the FIFO buffer. When the transfer starts, a read back in this register returns the current SPI word transfer index. 0h = Counter not used 1h = One SPI word FFFEh = 65534 SPI word FFFFh = 65535 SPI word |
| 15-8 | AFL | R/W | 0h | Buffer almost full. This register holds the programmable almost-full level value used to determine almost-full buffer condition. If the user wants an interrupt or a DMA read request to be issued during a receive operation when the data buffer holds at least n bytes, then the buffer SPI_XFERLEVEL[AFL] must be set with n-1. 0h = 1 byte 1h = 2 bytes Fh = 16 bytes |
| 7-0 | AEL | R/W | 0h | Buffer almost empty. This register holds the programmable almost-empty level value used to determine almost-empty buffer condition. If the user wants an interrupt or a DMA write request to be issued during a transmit operation when the data buffer is able to receive n bytes, then the buffer SPI_XFERLEVEL[AEL] must be set with n-1. 0h = 1 byte 1h = 2 bytes Fh = 16 bytes |