\n

SPI

Peripheral Memory Blocks

address_offset : 0x0 Bytes (0x0)
size : 0x1000 byte (0x0)
mem_usage : registers
protection : not protected

Registers

CR0

CPSR

IMSC

RIS

MIS

ICR

DMACR

RXFRM

CHN

WDTXF

CR1

DR

ITCR

TDR

SR


CR0

Control Register 0
address_offset : 0x0 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

CR0 CR0 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DSS SPO SPH SCR SPIM INVCLK CS1

DSS : Data size select. (DSS+1) defines the number of bits:


bits : 0 - 4 (5 bit)

Enumeration:

3 : DATA_4BIT

4-bit data

4 : DATA_5BIT

5-bit data

5 : DATA_6BIT

6-bit data

6 : DATA_7BIT

7-bit data

7 : DATA_8BIT

8-bit data

8 : DATA_9BIT

9-bit data

9 : DATA_10BIT

10-bit data

10 : DATA_11BIT

11-bit data

11 : DATA_12BIT

12-bit data

12 : DATA_13BIT

13-bit data

13 : DATA_14BIT

14-bit data

14 : DATA_15BIT

15-bit data

15 : DATA_16BIT

16-bit data

16 : DATA_17BIT

17-bit data

17 : DATA_18BIT

18-bit data

18 : DATA_19BIT

19-bit data

19 : DATA_20BIT

20-bit data

20 : DATA_21BIT

21-bit data

21 : DATA_22BIT

22-bit data

22 : DATA_23BIT

23-bit data

23 : DATA_24BIT

24-bit data

24 : DATA_25BIT

25-bit data

25 : DATA_26BIT

26-bit data

26 : DATA_27BIT

27-bit data

27 : DATA_28BIT

28-bit data

28 : DATA_29BIT

29-bit data

29 : DATA_30BIT

30-bit data

30 : DATA_31BIT

31-bit data

31 : DATA_32BIT

32-bit data

End of enumeration elements list.

SPO : Clock polarity.


bits : 6 - 6 (1 bit)

Enumeration:

0 : INACTIVE_LOW

The inactive or idle state of SSPCLKO is LOW

1 : INACTIVE_HIGH

The inactive or idle state of SSPCLKO is HIGH

End of enumeration elements list.

SPH : Clock phase.


bits : 7 - 7 (1 bit)

Enumeration:

0 : PHASE_0

Received data is captured on the rising edge (SPO=0) or on the falling edge (SPO=1) of SSPCLKO. Transmitted data is sent on the falling edge (SPO=0) or on the rising edge (SPO=1) of SSPCLKO

1 : PHASE_1

Received data is captured on the falling edge (SPO=0) or on the rising edge (SPO=1) of SSPCLKO.Transmitted data is sent on the rising edge (SPO=0) or on the falling edge (SPO=1) of SSPCLKO

End of enumeration elements list.

SCR : Serial Clock Rate.

The SRC value is used to generate the transmit and receive bit rate of the SPI. The bit rate is: f_SPICLK / (CPSDVR * (1 + SCR)), where CPSDVR is an even value from 2 to 254 and SCR is a value from 0 to 255.


bits : 8 - 15 (8 bit)

SPIM : SPI transmission mode.


bits : 23 - 24 (2 bit)

Enumeration:

0 : FULL_DUPLEX

SPI is configured in full duplex mode

1 : TRANSMIT

SPI is configured in transmit mode

2 : RECEIVE

SPI is configured in receive mode

3 : COMBINED

SPI is configured in combined mode

End of enumeration elements list.

INVCLK : Activate inversion (in master mode only).


bits : 25 - 25 (1 bit)

CS1 : Chip Selection for slave one


bits : 26 - 26 (1 bit)

Enumeration:

0 : CS1_NOT_SELECT

Slave 1 is select

1 : CS1_SELECT

Slave 1 is not select

End of enumeration elements list.


CPSR

Clock prescale register
address_offset : 0x10 Bytes (0x0)
size : 8 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

CPSR CPSR read-write 0 1 2 3 4 5 6 7 Resets to 0 0 0 0 0 0 0 0 CPSDVSR

CPSDVSR : Clock prescale divisor.It must be an even number from 2 to 254. The value is used to generate the transmit and receive bit rate of the SPI. The bit rate is:

FSSPCLK / [CPSDVR x (1+SCR)]

where SCR is a value from 0 to 255, programmed through the SSP_CR0 register.
bits : 0 - 7 (8 bit)


IMSC

Interrupt mask set or clear register
address_offset : 0x14 Bytes (0x0)
size : 8 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

IMSC IMSC read-write 0 1 2 3 4 5 6 7 Resets to 0 0 0 0 0 0 0 0 RORIM RTIM RXIM TXIM TURIM TEIM

RORIM : Receive overrun interrupt mask:


bits : 0 - 0 (1 bit)

Enumeration:

0 : IRQ_DISABLE

irq disable

1 : IRQ_ENABLE

irq enable

End of enumeration elements list.

RTIM : Receive timeout interrupt mask:


bits : 1 - 1 (1 bit)

RXIM : Receive FIFO interrupt mask:


bits : 2 - 2 (1 bit)

TXIM : Transmit FIFO interrupt mask:


bits : 3 - 3 (1 bit)

TURIM : Transmit underrun interrupt mask:


bits : 4 - 4 (1 bit)

TEIM : Transmit FIFO empty interrupt mask:


bits : 5 - 5 (1 bit)


RIS

Raw interrupt status register
address_offset : 0x18 Bytes (0x0)
size : 8 bit
access : read-only
reset_value : 0x0
reset_Mask : 0x0

RIS RIS read-only 0 1 2 3 4 5 6 7 Resets to 0 0 0 0 0 0 0 0 RORRIS RTRIS RXRIS TXRIS TURRIS TERIS

RORRIS : Receive overrun raw interrupt status
bits : 0 - 0 (1 bit)

RTRIS : Receive time out raw interrupt status
bits : 1 - 1 (1 bit)

RXRIS : Receive raw interrupt status
bits : 2 - 2 (1 bit)

TXRIS : Transmit raw interrupt status
bits : 3 - 3 (1 bit)

TURRIS : Transmit underrun raw interrupt Status
bits : 4 - 4 (1 bit)

TERIS : Transmit FIFO Empty Raw Interrupt Status
bits : 5 - 5 (1 bit)


MIS

Masked Interrupt Status Register
address_offset : 0x1C Bytes (0x0)
size : 8 bit
access : read-only
reset_value : 0x0
reset_Mask : 0x0

MIS MIS read-only 0 1 2 3 4 5 6 7 Resets to 0 0 0 0 0 0 0 0 RORMIS RTMIS RXMIS TXMIS TURMIS TEMIS

RORMIS : Receive Overrun Masked Interrupt Status: gives the interrupt status after masking of the receive overrun interrupt.
bits : 0 - 0 (1 bit)

RTMIS : Receive Time Out Masked Interrupt Status: gives the interrupt status after masking of receive timeout interrupt.
bits : 1 - 1 (1 bit)

RXMIS : Receive Masked Interrupt Status: gives the interrupt status after masking of the receive interrupt.
bits : 2 - 2 (1 bit)

TXMIS : Transmit Masked Interrupt Status: gives the interrupt status after masking of the transmit interrupt.
bits : 3 - 3 (1 bit)

TURMIS : Transmit Underrun Masked Interrupt Status: gives the interrupt status after masking of the transmit underrun interrupt.
bits : 4 - 4 (1 bit)

TEMIS : Transmit FIFO Empty Masked Interrupt Status: gives the interrupt status after masking of the transmit FIFO empty interrupt.
bits : 5 - 5 (1 bit)


ICR

Interrupt clear register
address_offset : 0x20 Bytes (0x0)
size : 8 bit
access : write-only
reset_value : 0x0
reset_Mask : 0x0

ICR ICR write-only 0 1 2 3 4 5 6 7 Resets to 0 0 0 0 0 0 0 0 RORIC RTIC TURIC

RORIC : Receive Overrun Clear Interrupt: writing 1 clears the receive overrun interrupt.
bits : 0 - 0 (1 bit)

RTIC : Receive Time Out Clear Interrupt: writing 1 clears the receive timeout interrupt.
bits : 1 - 1 (1 bit)

TURIC : Transmit Underrun Clear Interrupt: writing 1 clears the transmit overrun interrupt.
bits : 2 - 2 (1 bit)


DMACR

SPI DMA control register
address_offset : 0x24 Bytes (0x0)
size : 8 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

DMACR DMACR read-write 0 1 2 3 4 5 6 7 Resets to 0 0 0 0 0 0 0 0 RXDMASE TXDMASE

RXDMASE : Single receive DMA request.


bits : 0 - 0 (1 bit)

Enumeration:

0 : RX_DMA_DISABLE

Single transfer DMA in receive disable

1 : RX_DMA_ENABLE

Single transfer DMA in receive enable

End of enumeration elements list.

TXDMASE : Signle transmit DMA request.


bits : 2 - 2 (1 bit)

Enumeration:

0 : TX_DMA_DISABLE

Single transfer DMA in transmit disable

1 : TX_DMA_ENABLE

Single transfer DMA in transmit enable

End of enumeration elements list.


RXFRM

SPI Receive Frame register. Indicates the number of frames to receive from the slave.
address_offset : 0x28 Bytes (0x0)
size : 16 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

RXFRM RXFRM read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

CHN

Dummy character register
address_offset : 0x2C Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

CHN CHN read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

WDTXF

SPI transmit FIFO receive frame number. Indicates the number of frames to receive from the transmit FIFO.
address_offset : 0x30 Bytes (0x0)
size : 16 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

WDTXF WDTXF read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

CR1

Control Register 1
address_offset : 0x4 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

CR1 CR1 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SSE MS SOD RENDN RXIFLSEL TXIFLSEL FLOWCTRLEN MSPIWAIT TENDN DATAINDEL

SSE : SPI enable.


bits : 1 - 1 (1 bit)

Enumeration:

0 : DISABLE

SSP operation disable

1 : ENABLE

SSP operation enable

End of enumeration elements list.

MS : Master or slave mode select.


bits : 2 - 2 (1 bit)

Enumeration:

0 : MASTER

Master mode

1 : SLAVE

Slave mode

End of enumeration elements list.

SOD : Slave mode output disable (slave mode only).

In multiple slave system, it is possible for a SPI master to broadcast a message to all slaves in the system while ensuring only one slave drives data onto the serial output line MISO.
bits : 3 - 3 (1 bit)

RENDN : Receive endian format.

The cases 00b and 11b are set for data frame size from 4 to 32 bits. The cases 01b and 10b are set only for data frame size 16, 24 and 32 bits.
bits : 4 - 5 (2 bit)

Enumeration:

0 : MSB_FIRST_MSB_FIRST

The element is received MSByte-first and MSbit-first

1 : LSB_FIRST_MSB_FIRST

The element is received LSByte-first and MSbit-first

2 : MSB_FIRST_LSB_FIRST

The element is received MSByte-first and LSbit-first

3 : LSB_FIRST_LSB_FIRST

The element is received LSByte-first and LSbit-first

End of enumeration elements list.

RXIFLSEL : Receive interrupt FIFO level select. This bit field selects the trigger points to receive FIFO interrupt:


bits : 7 - 9 (3 bit)

Enumeration:

0 : MIN_1ELEMENT

Rx FIFO contains 1 element or more

1 : MIN_4ELEMENTS

Rx FIFO contains 4 elements or more

2 : MIN_8ELEMENTS

Rx FIFO contains 8 elements or more

End of enumeration elements list.

TXIFLSEL : Transmit interrupt FIFO level select. This bit field selects the trigger points to transmit FIFO interrupt:


bits : 10 - 12 (3 bit)

Enumeration:

0 : MIN_1ELEMENT

Tx FIFO contains 1 element or more

1 : MIN_4ELEMENTS

Tx FIFO contains 4 elements or more

2 : MIN_8ELEMENTS

Tx FIFO contains 8 elements or more

End of enumeration elements list.

FLOWCTRLEN : Flow Control Enable.


bits : 13 - 13 (1 bit)

Enumeration:

0 : DISABLE

Flow control disable

1 : ENABLE

Flow control enable

End of enumeration elements list.

MSPIWAIT : SPI Wait mode. This value is used to insert a wait state between frames.
bits : 14 - 17 (4 bit)

TENDN : Transmit endian format.

The cases 00b and 11b are set for data frame size from 4 to 32 bits. The cases 01b and 10b are set only for data frame size 16, 24 and 32 bits.
bits : 18 - 19 (2 bit)

DATAINDEL : Data input delay.


bits : 21 - 21 (1 bit)


DR

Data Register
address_offset : 0x8 Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

DR DR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 DATA

DATA : Transmit/Receive data:

Data must be right-justified when a data size of less than 32-bit is programmed. Unused bits are ignored by the transmit logic. The receive logic automatically right-justifies data.
bits : 0 - 31 (32 bit)


ITCR

Integration test control register
address_offset : 0x80 Bytes (0x0)
size : 8 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

ITCR ITCR read-write 0 1 2 3 4 5 6 7 Resets to 0 0 0 0 0 0 0 0 SWAPFIFO

SWAPFIFO : FIFO control mode:


bits : 1 - 1 (1 bit)

Enumeration:

0 : FIFO_NORMAL_MODE

FIFO normal mode

1 : FIFO_TEST_MODE

FIFO test mode

End of enumeration elements list.


TDR

FIFO Test Data Register
address_offset : 0x8C Bytes (0x0)
size : 32 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

TDR TDR read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

SR

Status Register
address_offset : 0xC Bytes (0x0)
size : 8 bit
access : read-only
reset_value : 0x0
reset_Mask : 0x0

SR SR read-only 0 1 2 3 4 5 6 7 Resets to 0 0 0 0 0 0 0 0 TFE TNF RNE RFF BSY

TFE : Transmit FIFO empty:


bits : 0 - 0 (1 bit)

TNF : Transmit FIFO not full:


bits : 1 - 1 (1 bit)

RNE : Receive FIFO not empty:


bits : 2 - 2 (1 bit)

RFF : Receive FIFO full:


bits : 3 - 3 (1 bit)

BSY : SPI busy flag:


bits : 4 - 4 (1 bit)



Is something missing? Is something wrong? can you help correct it ? Please contact us at info@chipselect.org !

This website is sponsored by EmbeetleEmbeetle, an IDE designed from scratch for embedded software developers.